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" |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 9 | #include "SkTypes.h" |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 10 | |
| 11 | void cubecode_test(int test); |
| 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; |
skia.committer@gmail.com | 61b05dc | 2012-12-14 02:02:06 +0000 | [diff] [blame] | 17 | |
caryclark@google.com | d68bc30 | 2013-01-07 13:17:18 +0000 | [diff] [blame] | 18 | CubicsToQuadratics_RandTest(); |
caryclark@google.com | 6d0032a | 2013-01-04 19:41:13 +0000 | [diff] [blame] | 19 | CubicToQuadratics_Test(); |
caryclark@google.com | c91dfe4 | 2012-10-16 12:06:27 +0000 | [diff] [blame] | 20 | SimplifyNew_Test(); |
caryclark@google.com | 8f9f468 | 2013-01-03 21:18:16 +0000 | [diff] [blame] | 21 | Simplify4x4RectsThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 22 | Simplify4x4QuadraticsThreaded_Test(testsRun); |
caryclark@google.com | 03f9706 | 2012-08-21 13:13:52 +0000 | [diff] [blame] | 23 | QuadLineIntersectThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 24 | SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun); |
| 25 | SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun); |
| 26 | Simplify4x4QuadralateralsThreaded_Test(testsRun); |
caryclark@google.com | e7bd5f4 | 2012-12-13 19:47:53 +0000 | [diff] [blame] | 27 | ShapeOps4x4RectsThreaded_Test(testsRun); |
caryclark@google.com | 24bec79 | 2012-08-20 12:43:57 +0000 | [diff] [blame] | 28 | SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun); |
caryclark@google.com | e7bd5f4 | 2012-12-13 19:47:53 +0000 | [diff] [blame] | 29 | QuadraticIntersection_Test(); |
| 30 | LineQuadraticIntersection_Test(); |
| 31 | MiniSimplify_Test(); |
| 32 | SimplifyAngle_Test(); |
| 33 | QuarticRoot_Test(); |
caryclark@google.com | 32546db | 2012-08-31 20:55:07 +0000 | [diff] [blame] | 34 | QuadraticBezierClip_Test(); |
caryclark@google.com | 1577e8f | 2012-05-22 17:01:14 +0000 | [diff] [blame] | 35 | SimplifyFindNext_Test(); |
caryclark@google.com | b45a1b4 | 2012-05-18 20:50:33 +0000 | [diff] [blame] | 36 | SimplifyFindTop_Test(); |
caryclark@google.com | b45a1b4 | 2012-05-18 20:50:33 +0000 | [diff] [blame] | 37 | QuadraticReduceOrder_Test(); |
caryclark@google.com | fa0588f | 2012-04-26 21:01:06 +0000 | [diff] [blame] | 38 | SimplifyAddIntersectingTs_Test(); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 39 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 40 | cubecode_test(1); |
| 41 | convert_testx(); |
| 42 | // tests are in dependency / complexity order |
| 43 | Inline_Tests(); |
| 44 | ConvexHull_Test(); |
| 45 | ConvexHull_X_Test(); |
| 46 | |
| 47 | LineParameter_Test(); |
| 48 | LineIntersection_Test(); |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 49 | LineCubicIntersection_Test(); |
| 50 | |
caryclark@google.com | a576423 | 2012-03-28 16:20:21 +0000 | [diff] [blame] | 51 | SimplifyQuadraticPaths_Test(); |
| 52 | |
caryclark@google.com | 4917f17 | 2012-03-05 22:01:21 +0000 | [diff] [blame] | 53 | SimplifyPolygonPaths_Test(); |
caryclark@google.com | 2e7f4c8 | 2012-03-20 21:11:59 +0000 | [diff] [blame] | 54 | SimplifyRectangularPaths_Test(); |
caryclark@google.com | 4917f17 | 2012-03-05 22:01:21 +0000 | [diff] [blame] | 55 | SimplifyQuadralateralPaths_Test(); |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 56 | |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 57 | ActiveEdge_Test(); |
caryclark@google.com | d88e089 | 2012-03-27 13:23:51 +0000 | [diff] [blame] | 58 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 59 | QuadraticCoincidence_Test(); |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 60 | QuadraticIntersection_Test(); |
| 61 | |
| 62 | CubicParameterization_Test(); |
| 63 | CubicCoincidence_Test(); |
| 64 | CubicReduceOrder_Test(); |
| 65 | CubicBezierClip_Test(); |
| 66 | CubicIntersection_Test(); |
caryclark@google.com | c682590 | 2012-02-03 22:07:47 +0000 | [diff] [blame] | 67 | |
caryclark@google.com | 27accef | 2012-01-25 18:57:23 +0000 | [diff] [blame] | 68 | } |