Intersection_Tests.cpp revision 73ca6243b31e225e9fd5b75a96cbc82d62557de6
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 QuadraticIntersection_Test(); 19 CubicIntersection_OneOffTest(); 20 CubicIntersection_RandTest(); 21 SimplifyNew_Test(); 22 CubicsToQuadratics_RandTest(); 23 CubicToQuadratics_Test(); 24 Simplify4x4RectsThreaded_Test(testsRun); 25 Simplify4x4QuadraticsThreaded_Test(testsRun); 26 QuadLineIntersectThreaded_Test(testsRun); 27 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun); 28 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun); 29 Simplify4x4QuadralateralsThreaded_Test(testsRun); 30 ShapeOps4x4RectsThreaded_Test(testsRun); 31 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun); 32 LineQuadraticIntersection_Test(); 33 MiniSimplify_Test(); 34 SimplifyAngle_Test(); 35 QuarticRoot_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