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