blob: a8b4416ef7294376ce9f82f11196ce7098800635 [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);
11
caryclark@google.comfa0588f2012-04-26 21:01:06 +000012#define TEST_QUADS_FIRST 0
caryclark@google.com78e17132012-04-17 11:40:34 +000013
caryclark@google.com27accef2012-01-25 18:57:23 +000014void Intersection_Tests() {
caryclark@google.com24bec792012-08-20 12:43:57 +000015 int testsRun = 0;
skia.committer@gmail.com0c38ed32013-02-05 07:02:01 +000016
caryclark@google.comf9502d72013-02-04 14:06:49 +000017 CubicIntersection_IntersectionFinder();
caryclark@google.com73ca6242013-01-17 21:02:47 +000018 CubicIntersection_OneOffTest();
caryclark@google.comf9502d72013-02-04 14:06:49 +000019 SimplifyNew_Test();
caryclark@google.comaa358312013-01-29 20:28:49 +000020 ShapeOps4x4CubicsThreaded_Test(testsRun);
21 CubicToQuadratics_Test();
caryclark@google.com85ec74c2013-01-28 19:25:51 +000022 QuadraticIntersection_Test();
caryclark@google.com9f602912013-01-24 21:47:16 +000023 QuarticRoot_Test();
24 CubicIntersection_RandTest();
caryclark@google.comd68bc302013-01-07 13:17:18 +000025 CubicsToQuadratics_RandTest();
caryclark@google.com8f9f4682013-01-03 21:18:16 +000026 Simplify4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000027 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000028 QuadLineIntersectThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000029 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
30 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
31 Simplify4x4QuadralateralsThreaded_Test(testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000032 ShapeOps4x4RectsThreaded_Test(testsRun);
caryclark@google.com24bec792012-08-20 12:43:57 +000033 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.come7bd5f42012-12-13 19:47:53 +000034 LineQuadraticIntersection_Test();
35 MiniSimplify_Test();
36 SimplifyAngle_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000037 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000038 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000039 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000040 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000041 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000042
caryclark@google.com27accef2012-01-25 18:57:23 +000043 cubecode_test(1);
44 convert_testx();
45 // tests are in dependency / complexity order
46 Inline_Tests();
47 ConvexHull_Test();
48 ConvexHull_X_Test();
49
50 LineParameter_Test();
51 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000052 LineCubicIntersection_Test();
53
caryclark@google.coma5764232012-03-28 16:20:21 +000054 SimplifyQuadraticPaths_Test();
55
caryclark@google.com4917f172012-03-05 22:01:21 +000056 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000057 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000058 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000059
caryclark@google.com78e17132012-04-17 11:40:34 +000060 ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000061
caryclark@google.com27accef2012-01-25 18:57:23 +000062 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000063 QuadraticIntersection_Test();
64
65 CubicParameterization_Test();
66 CubicCoincidence_Test();
67 CubicReduceOrder_Test();
68 CubicBezierClip_Test();
69 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000070
caryclark@google.com27accef2012-01-25 18:57:23 +000071}