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