blob: 36582fe3171d08c0b5b2bde7b6fa001ad0ddbd8b [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.com235f56a2012-09-14 14:19:30 +000017 QuarticRoot_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000018 // QuadraticIntersection_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000019 SimplifyNew_Test();
caryclark@google.com24bec792012-08-20 12:43:57 +000020 Simplify4x4QuadraticsThreaded_Test(testsRun);
caryclark@google.com03f97062012-08-21 13:13:52 +000021 QuadLineIntersectThreaded_Test(testsRun);
22 LineQuadraticIntersection_Test();
caryclark@google.com24bec792012-08-20 12:43:57 +000023 Simplify4x4RectsThreaded_Test(testsRun);
24 SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
25 SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
26 Simplify4x4QuadralateralsThreaded_Test(testsRun);
27 SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
caryclark@google.coma7e483d2012-08-28 20:44:43 +000028 SimplifyAngle_Test();
caryclark@google.com32546db2012-08-31 20:55:07 +000029 QuadraticBezierClip_Test();
caryclark@google.com1577e8f2012-05-22 17:01:14 +000030 SimplifyFindNext_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000031 SimplifyFindTop_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000032 QuadraticReduceOrder_Test();
caryclark@google.comb45a1b42012-05-18 20:50:33 +000033 QuadraticIntersection_Test();
caryclark@google.comfa0588f2012-04-26 21:01:06 +000034 SimplifyAddIntersectingTs_Test();
rmistry@google.comd6176b02012-08-23 18:14:13 +000035
caryclark@google.com27accef2012-01-25 18:57:23 +000036 cubecode_test(1);
37 convert_testx();
38 // tests are in dependency / complexity order
39 Inline_Tests();
40 ConvexHull_Test();
41 ConvexHull_X_Test();
42
43 LineParameter_Test();
44 LineIntersection_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000045 LineCubicIntersection_Test();
46
caryclark@google.coma5764232012-03-28 16:20:21 +000047 SimplifyQuadraticPaths_Test();
48
caryclark@google.com4917f172012-03-05 22:01:21 +000049 SimplifyPolygonPaths_Test();
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000050 SimplifyRectangularPaths_Test();
caryclark@google.com4917f172012-03-05 22:01:21 +000051 SimplifyQuadralateralPaths_Test();
caryclark@google.com78e17132012-04-17 11:40:34 +000052
caryclark@google.com78e17132012-04-17 11:40:34 +000053 ActiveEdge_Test();
caryclark@google.comd88e0892012-03-27 13:23:51 +000054
caryclark@google.com27accef2012-01-25 18:57:23 +000055 QuadraticCoincidence_Test();
caryclark@google.com27accef2012-01-25 18:57:23 +000056 QuadraticIntersection_Test();
57
58 CubicParameterization_Test();
59 CubicCoincidence_Test();
60 CubicReduceOrder_Test();
61 CubicBezierClip_Test();
62 CubicIntersection_Test();
caryclark@google.comc6825902012-02-03 22:07:47 +000063
caryclark@google.com27accef2012-01-25 18:57:23 +000064}