Intersection_Tests.cpp revision 47d73daa7a971e7eee5822def7922f7d43b2dc47
1/*
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 */
7#include "CubicIntersection_TestData.h"
8#include "Intersection_Tests.h"
9
10void cubecode_test(int test);
11void parseSVG();
12
13#define TEST_QUADS_FIRST 0
14
15void Intersection_Tests() {
16    int testsRun = 0;
17#if 0
18    QuadraticIntersection_IntersectionFinder();
19    QuadraticIntersection_OneOffTest();
20    CubicIntersection_IntersectionFinder();
21    CubicIntersection_NewOneOffTest();
22#endif
23    SimplifyNew_Test();
24    CubicsToQuadratics_OneOffTest();
25    CubicIntersection_OneOffTest();
26    CubicIntersection_OneOffTests();
27  #if 0
28    parseSVG();
29  #endif
30//    QuadraticIntersection_PointFinder();
31    ShapeOps4x4CubicsThreaded_Test(testsRun);
32    CubicToQuadratics_Test();
33    QuadraticIntersection_Test();
34    QuarticRoot_Test();
35    CubicIntersection_RandTest();
36    CubicsToQuadratics_RandTest();
37    Simplify4x4RectsThreaded_Test(testsRun);
38    Simplify4x4QuadraticsThreaded_Test(testsRun);
39    QuadLineIntersectThreaded_Test(testsRun);
40    SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
41    SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
42    Simplify4x4QuadralateralsThreaded_Test(testsRun);
43    ShapeOps4x4RectsThreaded_Test(testsRun);
44    SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
45    LineQuadraticIntersection_Test();
46    MiniSimplify_Test();
47    SimplifyAngle_Test();
48    QuadraticBezierClip_Test();
49    SimplifyFindNext_Test();
50    SimplifyFindTop_Test();
51    QuadraticReduceOrder_Test();
52    SimplifyAddIntersectingTs_Test();
53
54    cubecode_test(1);
55    convert_testx();
56    // tests are in dependency / complexity order
57    Inline_Tests();
58    ConvexHull_Test();
59    ConvexHull_X_Test();
60
61    LineParameter_Test();
62    LineIntersection_Test();
63    LineCubicIntersection_Test();
64
65    SimplifyQuadraticPaths_Test();
66
67    SimplifyPolygonPaths_Test();
68    SimplifyRectangularPaths_Test();
69    SimplifyQuadralateralPaths_Test();
70
71  //  ActiveEdge_Test();
72
73    QuadraticCoincidence_Test();
74    QuadraticIntersection_Test();
75
76    CubicParameterization_Test();
77    CubicCoincidence_Test();
78    CubicReduceOrder_Test();
79    CubicBezierClip_Test();
80    CubicIntersection_Test();
81
82}
83