blob: 0754ecc27f89c59015d0ac441af266202c9c5dfd [file] [log] [blame]
caryclark@google.com9e49fb62012-08-27 14:11:33 +00001/*
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.com27accef2012-01-25 18:57:23 +00007#include "CubicIntersection_TestData.h"
8#include "Intersection_Tests.h"
9
10void cubecode_test(int test);
caryclark@google.combeda3892013-02-07 13:13:41 +000011void parseSVG();
caryclark@google.com27accef2012-01-25 18:57:23 +000012
caryclark@google.comfa0588f2012-04-26 21:01:06 +000013#define TEST_QUADS_FIRST 0
caryclark@google.com78e17132012-04-17 11:40:34 +000014
caryclark@google.com27accef2012-01-25 18:57:23 +000015void Intersection_Tests() {
caryclark@google.com24bec792012-08-20 12:43:57 +000016 int testsRun = 0;
caryclark@google.comebf95ba2013-04-08 11:53:42 +000017#if 0
18 CubicIntersection_OneOffTest();
19 CubicIntersection_SelfTest();
caryclark@google.com1304bb22013-03-13 20:29:41 +000020 QuadraticIntersection_IntersectionFinder();
21 QuadraticIntersection_OneOffTest();
caryclark@google.comf9502d72013-02-04 14:06:49 +000022 CubicIntersection_IntersectionFinder();
caryclark@google.com1304bb22013-03-13 20:29:41 +000023 CubicUtilities_Test();
caryclark@google.comc83c70e2013-02-22 21:50:07 +000024#endif
caryclark@google.com47d73da2013-02-17 01:41:25 +000025 SimplifyNew_Test();
26 CubicsToQuadratics_OneOffTest();
caryclark@google.com73ca6242013-01-17 21:02:47 +000027 CubicIntersection_OneOffTest();
caryclark@google.com5e0500f2013-02-20 12:51:37 +000028// CubicIntersection_OneOffTests();
caryclark@google.combeda3892013-02-07 13:13:41 +000029 #if 0
30 parseSVG();
31 #endif
caryclark@google.com45a8fc62013-02-14 15:29:11 +000032// QuadraticIntersection_PointFinder();
caryclark@google.comaa358312013-01-29 20:28:49 +000033 ShapeOps4x4CubicsThreaded_Test(testsRun);
34 CubicToQuadratics_Test();
caryclark@google.com85ec74c2013-01-28 19:25:51 +000035 QuadraticIntersection_Test();
caryclark@google.com9f602912013-01-24 21:47:16 +000036 QuarticRoot_Test();
37 CubicIntersection_RandTest();
caryclark@google.comd68bc302013-01-07 13:17:18 +000038 CubicsToQuadratics_RandTest();
caryclark@google.com8f9f4682013-01-03 21:18:16 +000039 Simplify4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000040 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000041 QuadLineIntersectThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000042 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
43 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
44 Simplify4x4QuadralateralsThreaded_Test(testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000045 ShapeOps4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000046 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000047 LineQuadraticIntersection_Test();
48 MiniSimplify_Test();
49 SimplifyAngle_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000050 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000051 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000052 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000053 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000054 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000055
caryclark@google.com27accef2012-01-25 18:57:23 +000056 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.com27accef2012-01-25 18:57:23 +000065 LineCubicIntersection_Test();
66
caryclark@google.coma5764232012-03-28 16:20:21 +000067 SimplifyQuadraticPaths_Test();
68
caryclark@google.com4917f172012-03-05 22:01:21 +000069 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000070 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000071 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000072
caryclark@google.com45a8fc62013-02-14 15:29:11 +000073 // ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000074
caryclark@google.com27accef2012-01-25 18:57:23 +000075 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000076 QuadraticIntersection_Test();
77
78 CubicParameterization_Test();
79 CubicCoincidence_Test();
80 CubicReduceOrder_Test();
81 CubicBezierClip_Test();
82 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000083
caryclark@google.com27accef2012-01-25 18:57:23 +000084}