caryclark@google.com | 9e49fb6 | 2012-08-27 14:11:33 +0000 | [diff] [blame] | 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 | */ |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 7 | #include "CubicIntersection_TestData.h" |
| 8 | #include "Intersection_Tests.h" |
| 9 | |
| 10 | void cubecode_test(int test); |
caryclark@google.com | beda389 | 2013-02-07 13:13:41 +0000 | [diff] [blame] | 11 | void parseSVG(); |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 12 | |
caryclark@google.com | fa0588f | 2012-04-26 21:01:06 +0000 | [diff] [blame] | 13 | #define TEST_QUADS_FIRST 0 |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 14 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 15 | void Intersection_Tests() { |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 16 | int testsRun = 0; |
caryclark@google.com | ebf95ba | 2013-04-08 11:53:42 +0000 | [diff] [blame] | 17 | #if 0 |
| 18 | CubicIntersection_OneOffTest(); |
| 19 | CubicIntersection_SelfTest(); |
caryclark@google.com | 1304bb2 | 2013-03-13 20:29:41 +0000 | [diff] [blame] | 20 | QuadraticIntersection_IntersectionFinder(); |
| 21 | QuadraticIntersection_OneOffTest(); |
caryclark@google.com | f9502d7 | 2013-02-04 14:06:49 +0000 | [diff] [blame] | 22 | CubicIntersection_IntersectionFinder(); |
caryclark@google.com | 1304bb2 | 2013-03-13 20:29:41 +0000 | [diff] [blame] | 23 | CubicUtilities_Test(); |
caryclark@google.com | c83c70e | 2013-02-22 21:50:07 +0000 | [diff] [blame] | 24 | #endif |
caryclark@google.com | 47d73da | 2013-02-17 01:41:25 +0000 | [diff] [blame] | 25 | SimplifyNew_Test(); |
| 26 | CubicsToQuadratics_OneOffTest(); |
caryclark@google.com | 73ca624 | 2013-01-17 21:02:47 +0000 | [diff] [blame] | 27 | CubicIntersection_OneOffTest(); |
caryclark@google.com | 5e0500f | 2013-02-20 12:51:37 +0000 | [diff] [blame] | 28 | // CubicIntersection_OneOffTests(); |
caryclark@google.com | beda389 | 2013-02-07 13:13:41 +0000 | [diff] [blame] | 29 | #if 0 |
| 30 | parseSVG(); |
| 31 | #endif |
caryclark@google.com | 45a8fc6 | 2013-02-14 15:29:11 +0000 | [diff] [blame] | 32 | // QuadraticIntersection_PointFinder(); |
caryclark@google.com | aa35831 | 2013-01-29 20:28:49 +0000 | [diff] [blame] | 33 | ShapeOps4x4CubicsThreaded_Test(testsRun); |
| 34 | CubicToQuadratics_Test(); |
caryclark@google.com | 85ec74c | 2013-01-28 19:25:51 +0000 | [diff] [blame] | 35 | QuadraticIntersection_Test(); |
caryclark@google.com | 9f60291 | 2013-01-24 21:47:16 +0000 | [diff] [blame] | 36 | QuarticRoot_Test(); |
| 37 | CubicIntersection_RandTest(); |
caryclark@google.com | d68bc30 | 2013-01-07 13:17:18 +0000 | [diff] [blame] | 38 | CubicsToQuadratics_RandTest(); |
caryclark@google.com | 8f9f468 | 2013-01-03 21:18:16 +0000 | [diff] [blame] | 39 | Simplify4x4RectsThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 40 | Simplify4x4QuadraticsThreaded_Test(testsRun); |
caryclark@google.com | 03f9706 | 2012-08-21 13:13:52 +0000 | [diff] [blame] | 41 | QuadLineIntersectThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 42 | SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun); |
| 43 | SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun); |
| 44 | Simplify4x4QuadralateralsThreaded_Test(testsRun); |
caryclark@google.com | e7bd5f4 | 2012-12-13 19:47:53 +0000 | [diff] [blame] | 45 | ShapeOps4x4RectsThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 46 | SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun); |
caryclark@google.com | e7bd5f4 | 2012-12-13 19:47:53 +0000 | [diff] [blame] | 47 | LineQuadraticIntersection_Test(); |
| 48 | MiniSimplify_Test(); |
| 49 | SimplifyAngle_Test(); |
caryclark@google.com | 32546db | 2012-08-31 20:55:07 +0000 | [diff] [blame] | 50 | QuadraticBezierClip_Test(); |
caryclark@google.com | 1577e8f | 2012-05-22 17:01:14 +0000 | [diff] [blame] | 51 | SimplifyFindNext_Test(); |
caryclark@google.com | b45a1b4 | 2012-05-18 20:50:33 +0000 | [diff] [blame] | 52 | SimplifyFindTop_Test(); |
caryclark@google.com | b45a1b4 | 2012-05-18 20:50:33 +0000 | [diff] [blame] | 53 | QuadraticReduceOrder_Test(); |
caryclark@google.com | fa0588f | 2012-04-26 21:01:06 +0000 | [diff] [blame] | 54 | SimplifyAddIntersectingTs_Test(); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 55 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 56 | cubecode_test(1); |
| 57 | convert_testx(); |
| 58 | // tests are in dependency / complexity order |
| 59 | Inline_Tests(); |
| 60 | ConvexHull_Test(); |
| 61 | ConvexHull_X_Test(); |
| 62 | |
| 63 | LineParameter_Test(); |
| 64 | LineIntersection_Test(); |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 65 | LineCubicIntersection_Test(); |
| 66 | |
caryclark@google.com | a576423 | 2012-03-28 16:20:21 +0000 | [diff] [blame] | 67 | SimplifyQuadraticPaths_Test(); |
| 68 | |
caryclark@google.com | 4917f17 | 2012-03-05 22:01:21 +0000 | [diff] [blame] | 69 | SimplifyPolygonPaths_Test(); |
caryclark@google.com | 2e7f4c8 | 2012-03-20 21:11:59 +0000 | [diff] [blame] | 70 | SimplifyRectangularPaths_Test(); |
caryclark@google.com | 4917f17 | 2012-03-05 22:01:21 +0000 | [diff] [blame] | 71 | SimplifyQuadralateralPaths_Test(); |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 72 | |
caryclark@google.com | 45a8fc6 | 2013-02-14 15:29:11 +0000 | [diff] [blame] | 73 | // ActiveEdge_Test(); |
caryclark@google.com | d88e089 | 2012-03-27 13:23:51 +0000 | [diff] [blame] | 74 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 75 | QuadraticCoincidence_Test(); |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 76 | QuadraticIntersection_Test(); |
| 77 | |
| 78 | CubicParameterization_Test(); |
| 79 | CubicCoincidence_Test(); |
| 80 | CubicReduceOrder_Test(); |
| 81 | CubicBezierClip_Test(); |
| 82 | CubicIntersection_Test(); |
caryclark@google.com | c682590 | 2012-02-03 22:07:47 +0000 | [diff] [blame] | 83 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 84 | } |