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