blob: 8a8cb30c0c9cf4ff1d00920821df69a4b5a8e94f [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"
caryclark@google.com24bec792012-08-20 12:43:57 +00009#include "SkTypes.h"
caryclark@google.com27accef2012-01-25 18:57:23 +000010
11void cubecode_test(int test);
12
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.comc91dfe42012-10-16 12:06:27 +000017 SimplifyNew_Test();
caryclark@google.com6aea33f2012-10-09 14:11:58 +000018 QuadraticIntersection_Test();
caryclark@google.coma461ff02012-10-11 12:54:23 +000019 MiniSimplify_Test();
caryclark@google.com6aea33f2012-10-09 14:11:58 +000020 SimplifyAngle_Test();
caryclark@google.com235f56a2012-09-14 14:19:30 +000021 QuarticRoot_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000022 // QuadraticIntersection_Test();
caryclark@google.com24bec792012-08-20 12:43:57 +000023 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000024 QuadLineIntersectThreaded_Test(testsRun);
25 LineQuadraticIntersection_Test();
caryclark@google.com24bec792012-08-20 12:43:57 +000026 Simplify4x4RectsThreaded_Test(testsRun);
27 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
28 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
29 Simplify4x4QuadralateralsThreaded_Test(testsRun);
30 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.com32546db2012-08-31 20:55:07 +000031 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000032 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000033 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000034 QuadraticReduceOrder_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000035 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000036
caryclark@google.com27accef2012-01-25 18:57:23 +000037 cubecode_test(1);
38 convert_testx();
39 // tests are in dependency / complexity order
40 Inline_Tests();
41 ConvexHull_Test();
42 ConvexHull_X_Test();
43
44 LineParameter_Test();
45 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000046 LineCubicIntersection_Test();
47
caryclark@google.coma5764232012-03-28 16:20:21 +000048 SimplifyQuadraticPaths_Test();
49
caryclark@google.com4917f172012-03-05 22:01:21 +000050 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000051 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000052 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000053
caryclark@google.com78e17132012-04-17 11:40:34 +000054 ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000055
caryclark@google.com27accef2012-01-25 18:57:23 +000056 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000057 QuadraticIntersection_Test();
58
59 CubicParameterization_Test();
60 CubicCoincidence_Test();
61 CubicReduceOrder_Test();
62 CubicBezierClip_Test();
63 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000064
caryclark@google.com27accef2012-01-25 18:57:23 +000065}