blob: e828184e468dee3160633e5f75b2313db457a331 [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.combeda3892013-02-07 13:13:41 +000017 QuadraticIntersection_OneOffTest();
caryclark@google.comf9502d72013-02-04 14:06:49 +000018 CubicIntersection_IntersectionFinder();
caryclark@google.com73ca6242013-01-17 21:02:47 +000019 CubicIntersection_OneOffTest();
caryclark@google.combeda3892013-02-07 13:13:41 +000020 #if 0
21 parseSVG();
22 #endif
caryclark@google.comf9502d72013-02-04 14:06:49 +000023 SimplifyNew_Test();
caryclark@google.combeda3892013-02-07 13:13:41 +000024 QuadraticIntersection_PointFinder();
caryclark@google.comaa358312013-01-29 20:28:49 +000025 ShapeOps4x4CubicsThreaded_Test(testsRun);
26 CubicToQuadratics_Test();
caryclark@google.com85ec74c2013-01-28 19:25:51 +000027 QuadraticIntersection_Test();
caryclark@google.com9f602912013-01-24 21:47:16 +000028 QuarticRoot_Test();
29 CubicIntersection_RandTest();
caryclark@google.comd68bc302013-01-07 13:17:18 +000030 CubicsToQuadratics_RandTest();
caryclark@google.com8f9f4682013-01-03 21:18:16 +000031 Simplify4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000032 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000033 QuadLineIntersectThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000034 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
35 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
36 Simplify4x4QuadralateralsThreaded_Test(testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000037 ShapeOps4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000038 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000039 LineQuadraticIntersection_Test();
40 MiniSimplify_Test();
41 SimplifyAngle_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000042 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000043 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000044 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000045 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000046 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000047
caryclark@google.com27accef2012-01-25 18:57:23 +000048 cubecode_test(1);
49 convert_testx();
50 // tests are in dependency / complexity order
51 Inline_Tests();
52 ConvexHull_Test();
53 ConvexHull_X_Test();
54
55 LineParameter_Test();
56 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000057 LineCubicIntersection_Test();
58
caryclark@google.coma5764232012-03-28 16:20:21 +000059 SimplifyQuadraticPaths_Test();
60
caryclark@google.com4917f172012-03-05 22:01:21 +000061 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000062 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000063 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000064
caryclark@google.com78e17132012-04-17 11:40:34 +000065 ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000066
caryclark@google.com27accef2012-01-25 18:57:23 +000067 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000068 QuadraticIntersection_Test();
69
70 CubicParameterization_Test();
71 CubicCoincidence_Test();
72 CubicReduceOrder_Test();
73 CubicBezierClip_Test();
74 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000075
caryclark@google.com27accef2012-01-25 18:57:23 +000076}