2012-08-27 14:11:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2012-01-25 18:57:23 +00:00
|
|
|
#include "CubicIntersection_TestData.h"
|
|
|
|
#include "Intersection_Tests.h"
|
|
|
|
|
|
|
|
void cubecode_test(int test);
|
2013-02-07 13:13:41 +00:00
|
|
|
void parseSVG();
|
2012-01-25 18:57:23 +00:00
|
|
|
|
2012-04-26 21:01:06 +00:00
|
|
|
#define TEST_QUADS_FIRST 0
|
2012-04-17 11:40:34 +00:00
|
|
|
|
2012-01-25 18:57:23 +00:00
|
|
|
void Intersection_Tests() {
|
2012-08-20 12:43:57 +00:00
|
|
|
int testsRun = 0;
|
2013-04-08 11:53:42 +00:00
|
|
|
#if 0
|
|
|
|
CubicIntersection_OneOffTest();
|
|
|
|
CubicIntersection_SelfTest();
|
2013-03-13 20:29:41 +00:00
|
|
|
QuadraticIntersection_IntersectionFinder();
|
|
|
|
QuadraticIntersection_OneOffTest();
|
2013-02-04 14:06:49 +00:00
|
|
|
CubicIntersection_IntersectionFinder();
|
2013-03-13 20:29:41 +00:00
|
|
|
CubicUtilities_Test();
|
2013-02-22 21:50:07 +00:00
|
|
|
#endif
|
2013-02-17 01:41:25 +00:00
|
|
|
SimplifyNew_Test();
|
|
|
|
CubicsToQuadratics_OneOffTest();
|
2013-01-17 21:02:47 +00:00
|
|
|
CubicIntersection_OneOffTest();
|
2013-02-20 12:51:37 +00:00
|
|
|
// CubicIntersection_OneOffTests();
|
2013-02-07 13:13:41 +00:00
|
|
|
#if 0
|
|
|
|
parseSVG();
|
|
|
|
#endif
|
2013-02-14 15:29:11 +00:00
|
|
|
// QuadraticIntersection_PointFinder();
|
2013-01-29 20:28:49 +00:00
|
|
|
ShapeOps4x4CubicsThreaded_Test(testsRun);
|
|
|
|
CubicToQuadratics_Test();
|
2013-01-28 19:25:51 +00:00
|
|
|
QuadraticIntersection_Test();
|
2013-01-24 21:47:16 +00:00
|
|
|
QuarticRoot_Test();
|
|
|
|
CubicIntersection_RandTest();
|
2013-01-07 13:17:18 +00:00
|
|
|
CubicsToQuadratics_RandTest();
|
2013-01-03 21:18:16 +00:00
|
|
|
Simplify4x4RectsThreaded_Test(testsRun);
|
2012-08-20 12:43:57 +00:00
|
|
|
Simplify4x4QuadraticsThreaded_Test(testsRun);
|
2012-08-21 13:13:52 +00:00
|
|
|
QuadLineIntersectThreaded_Test(testsRun);
|
2012-08-20 12:43:57 +00:00
|
|
|
SimplifyNondegenerate4x4TrianglesThreaded_Test(testsRun);
|
|
|
|
SimplifyDegenerate4x4TrianglesThreaded_Test(testsRun);
|
|
|
|
Simplify4x4QuadralateralsThreaded_Test(testsRun);
|
2012-12-13 19:47:53 +00:00
|
|
|
ShapeOps4x4RectsThreaded_Test(testsRun);
|
2012-08-20 12:43:57 +00:00
|
|
|
SkDebugf("%s total testsRun=%d\n", __FUNCTION__, testsRun);
|
2012-12-13 19:47:53 +00:00
|
|
|
LineQuadraticIntersection_Test();
|
|
|
|
MiniSimplify_Test();
|
|
|
|
SimplifyAngle_Test();
|
2012-08-31 20:55:07 +00:00
|
|
|
QuadraticBezierClip_Test();
|
2012-05-22 17:01:14 +00:00
|
|
|
SimplifyFindNext_Test();
|
2012-05-18 20:50:33 +00:00
|
|
|
SimplifyFindTop_Test();
|
|
|
|
QuadraticReduceOrder_Test();
|
2012-04-26 21:01:06 +00:00
|
|
|
SimplifyAddIntersectingTs_Test();
|
2012-08-23 18:14:13 +00:00
|
|
|
|
2012-01-25 18:57:23 +00:00
|
|
|
cubecode_test(1);
|
|
|
|
convert_testx();
|
|
|
|
// tests are in dependency / complexity order
|
|
|
|
Inline_Tests();
|
|
|
|
ConvexHull_Test();
|
|
|
|
ConvexHull_X_Test();
|
|
|
|
|
|
|
|
LineParameter_Test();
|
|
|
|
LineIntersection_Test();
|
|
|
|
LineCubicIntersection_Test();
|
|
|
|
|
2012-03-28 16:20:21 +00:00
|
|
|
SimplifyQuadraticPaths_Test();
|
|
|
|
|
2012-03-05 22:01:21 +00:00
|
|
|
SimplifyPolygonPaths_Test();
|
2012-03-20 21:11:59 +00:00
|
|
|
SimplifyRectangularPaths_Test();
|
2012-03-05 22:01:21 +00:00
|
|
|
SimplifyQuadralateralPaths_Test();
|
2012-04-17 11:40:34 +00:00
|
|
|
|
2013-02-14 15:29:11 +00:00
|
|
|
// ActiveEdge_Test();
|
2012-03-27 13:23:51 +00:00
|
|
|
|
2012-01-25 18:57:23 +00:00
|
|
|
QuadraticCoincidence_Test();
|
|
|
|
QuadraticIntersection_Test();
|
|
|
|
|
|
|
|
CubicParameterization_Test();
|
|
|
|
CubicCoincidence_Test();
|
|
|
|
CubicReduceOrder_Test();
|
|
|
|
CubicBezierClip_Test();
|
|
|
|
CubicIntersection_Test();
|
2012-02-03 22:07:47 +00:00
|
|
|
|
2012-01-25 18:57:23 +00:00
|
|
|
}
|