blob: f7663e400181d96eee8ffeed048de71b464dbc1f [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.com45a8fc62013-02-14 15:29:11 +000017 SimplifyNew_Test();
caryclark@google.combeda3892013-02-07 13:13:41 +000018 QuadraticIntersection_OneOffTest();
caryclark@google.com45a8fc62013-02-14 15:29:11 +000019 CubicsToQuadratics_OneOffTest();
caryclark@google.comf9502d72013-02-04 14:06:49 +000020 CubicIntersection_IntersectionFinder();
caryclark@google.com73ca6242013-01-17 21:02:47 +000021 CubicIntersection_OneOffTest();
caryclark@google.com45a8fc62013-02-14 15:29:11 +000022 CubicIntersection_OneOffTests();
23 QuadraticIntersection_OneOffTest();
caryclark@google.combeda3892013-02-07 13:13:41 +000024 #if 0
25 parseSVG();
26 #endif
caryclark@google.com45a8fc62013-02-14 15:29:11 +000027// QuadraticIntersection_PointFinder();
caryclark@google.comaa358312013-01-29 20:28:49 +000028 ShapeOps4x4CubicsThreaded_Test(testsRun);
29 CubicToQuadratics_Test();
caryclark@google.com85ec74c2013-01-28 19:25:51 +000030 QuadraticIntersection_Test();
caryclark@google.com9f602912013-01-24 21:47:16 +000031 QuarticRoot_Test();
32 CubicIntersection_RandTest();
caryclark@google.comd68bc302013-01-07 13:17:18 +000033 CubicsToQuadratics_RandTest();
caryclark@google.com8f9f4682013-01-03 21:18:16 +000034 Simplify4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000035 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000036 QuadLineIntersectThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000037 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
38 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
39 Simplify4x4QuadralateralsThreaded_Test(testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000040 ShapeOps4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000041 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000042 LineQuadraticIntersection_Test();
43 MiniSimplify_Test();
44 SimplifyAngle_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000045 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000046 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000047 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000048 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000049 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000050
caryclark@google.com27accef2012-01-25 18:57:23 +000051 cubecode_test(1);
52 convert_testx();
53 // tests are in dependency / complexity order
54 Inline_Tests();
55 ConvexHull_Test();
56 ConvexHull_X_Test();
57
58 LineParameter_Test();
59 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000060 LineCubicIntersection_Test();
61
caryclark@google.coma5764232012-03-28 16:20:21 +000062 SimplifyQuadraticPaths_Test();
63
caryclark@google.com4917f172012-03-05 22:01:21 +000064 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000065 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000066 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000067
caryclark@google.com45a8fc62013-02-14 15:29:11 +000068 // ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000069
caryclark@google.com27accef2012-01-25 18:57:23 +000070 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000071 QuadraticIntersection_Test();
72
73 CubicParameterization_Test();
74 CubicCoincidence_Test();
75 CubicReduceOrder_Test();
76 CubicBezierClip_Test();
77 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000078
caryclark@google.com27accef2012-01-25 18:57:23 +000079}