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"
|
2012-08-20 12:43:57 +00:00
|
|
|
#include "SkTypes.h"
|
2012-01-25 18:57:23 +00:00
|
|
|
|
|
|
|
void cubecode_test(int test);
|
|
|
|
|
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;
|
2012-12-14 02:02:06 +00:00
|
|
|
|
2013-01-22 12:55:54 +00:00
|
|
|
CubicIntersection_RandTest();
|
2013-01-17 21:02:47 +00:00
|
|
|
QuadraticIntersection_Test();
|
|
|
|
CubicIntersection_OneOffTest();
|
|
|
|
SimplifyNew_Test();
|
2013-01-07 13:17:18 +00:00
|
|
|
CubicsToQuadratics_RandTest();
|
2013-01-04 19:41:13 +00:00
|
|
|
CubicToQuadratics_Test();
|
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();
|
|
|
|
QuarticRoot_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
|
|
|
|
|
|
|
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
|
|
|
}
|