Intersection_Tests.cpp revision 85ec74ca543b13739db1ad55dedd7bdfae4ab1a6
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#include "SkTypes.h"
10
11void cubecode_test(int test);
12
13#define TEST_QUADS_FIRST 0
14
15void Intersection_Tests() {
16    int testsRun = 0;
17
18    SimplifyNew_Test();
19    CubicToQuadratics_Test();
20    CubicIntersection_OneOffTest();
21    QuadraticIntersection_Test();
22    QuarticRoot_Test();
23    CubicIntersection_RandTest();
24    CubicsToQuadratics_RandTest();
25    Simplify4x4RectsThreaded_Test(testsRun);
26    Simplify4x4QuadraticsThreaded_Test(testsRun);
27    QuadLineIntersectThreaded_Test(testsRun);
28    SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
29    SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
30    Simplify4x4QuadralateralsThreaded_Test(testsRun);
31    ShapeOps4x4RectsThreaded_Test(testsRun);
32    SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
33    LineQuadraticIntersection_Test();
34    MiniSimplify_Test();
35    SimplifyAngle_Test();
36    QuadraticBezierClip_Test();
37    SimplifyFindNext_Test();
38    SimplifyFindTop_Test();
39    QuadraticReduceOrder_Test();
40    SimplifyAddIntersectingTs_Test();
41
42    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();
51    LineCubicIntersection_Test();
52
53    SimplifyQuadraticPaths_Test();
54
55    SimplifyPolygonPaths_Test();
56    SimplifyRectangularPaths_Test();
57    SimplifyQuadralateralPaths_Test();
58
59    ActiveEdge_Test();
60
61    QuadraticCoincidence_Test();
62    QuadraticIntersection_Test();
63
64    CubicParameterization_Test();
65    CubicCoincidence_Test();
66    CubicReduceOrder_Test();
67    CubicBezierClip_Test();
68    CubicIntersection_Test();
69
70}
71