blob: 8e6e63e0ec193d9ff78ed7b6f605f308309ae268 [file] [log] [blame]
caryclark@google.com9e49fb62012-08-27 14:11:33 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
caryclark@google.com27accef2012-01-25 18:57:23 +00007#include "CubicIntersection_TestData.h"
8#include "Intersection_Tests.h"
caryclark@google.com24bec792012-08-20 12:43:57 +00009#include "SkTypes.h"
caryclark@google.com27accef2012-01-25 18:57:23 +000010
11void cubecode_test(int test);
12
caryclark@google.comfa0588f2012-04-26 21:01:06 +000013#define TEST_QUADS_FIRST 0
caryclark@google.com78e17132012-04-17 11:40:34 +000014
caryclark@google.com27accef2012-01-25 18:57:23 +000015void Intersection_Tests() {
caryclark@google.com24bec792012-08-20 12:43:57 +000016 int testsRun = 0;
skia.committer@gmail.com61b05dc2012-12-14 02:02:06 +000017
caryclark@google.com73ca6242013-01-17 21:02:47 +000018 QuadraticIntersection_Test();
19 CubicIntersection_OneOffTest();
20 CubicIntersection_RandTest();
21 SimplifyNew_Test();
caryclark@google.comd68bc302013-01-07 13:17:18 +000022 CubicsToQuadratics_RandTest();
caryclark@google.com6d0032a2013-01-04 19:41:13 +000023 CubicToQuadratics_Test();
caryclark@google.com8f9f4682013-01-03 21:18:16 +000024 Simplify4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000025 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000026 QuadLineIntersectThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000027 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
28 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
29 Simplify4x4QuadralateralsThreaded_Test(testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000030 ShapeOps4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000031 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000032 LineQuadraticIntersection_Test();
33 MiniSimplify_Test();
34 SimplifyAngle_Test();
35 QuarticRoot_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000036 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000037 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000038 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000039 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000040 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000041
caryclark@google.com27accef2012-01-25 18:57:23 +000042 cubecode_test(1);
43 convert_testx();
44 // tests are in dependency / complexity order
45 Inline_Tests();
46 ConvexHull_Test();
47 ConvexHull_X_Test();
48
49 LineParameter_Test();
50 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000051 LineCubicIntersection_Test();
52
caryclark@google.coma5764232012-03-28 16:20:21 +000053 SimplifyQuadraticPaths_Test();
54
caryclark@google.com4917f172012-03-05 22:01:21 +000055 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000056 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000057 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000058
caryclark@google.com78e17132012-04-17 11:40:34 +000059 ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000060
caryclark@google.com27accef2012-01-25 18:57:23 +000061 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000062 QuadraticIntersection_Test();
63
64 CubicParameterization_Test();
65 CubicCoincidence_Test();
66 CubicReduceOrder_Test();
67 CubicBezierClip_Test();
68 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000069
caryclark@google.com27accef2012-01-25 18:57:23 +000070}