aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsCubicIntersectionTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-03-24 08:17:16 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-24 08:17:16 -0700
commite02c944e97ad6a3b8befb1f4f784919767941ba6 (patch)
tree8819b69f03118f65eadb3d3b4c7ff99101b201e2 /tests/PathOpsCubicIntersectionTest.cpp
parent547019e1a671b1b30746e69b9647b201500e1504 (diff)
remove obsolete tests
remove tests that are breaking the build -- uninitialized memory TBR=reed Review URL: https://codereview.chromium.org/1030883002
Diffstat (limited to 'tests/PathOpsCubicIntersectionTest.cpp')
-rw-r--r--tests/PathOpsCubicIntersectionTest.cpp69
1 files changed, 0 insertions, 69 deletions
diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp
index a424c50c55..45a96509aa 100644
--- a/tests/PathOpsCubicIntersectionTest.cpp
+++ b/tests/PathOpsCubicIntersectionTest.cpp
@@ -683,72 +683,3 @@ DEF_TEST(PathOpsCubicIntersection, reporter) {
if (false) CubicIntersection_IntersectionFinder();
if (false) CubicIntersection_RandTest(reporter);
}
-
-static void binaryTest(const SkDCubic& cubic1, const SkDCubic& cubic2,
- skiatest::Reporter* reporter) {
- SkASSERT(ValidCubic(cubic1));
- SkASSERT(ValidCubic(cubic2));
- SkIntersections intersections;
- SkReduceOrder reduce1, reduce2;
- int order1 = reduce1.reduce(cubic1, SkReduceOrder::kNo_Quadratics);
- int order2 = reduce2.reduce(cubic2, SkReduceOrder::kNo_Quadratics);
- if (order1 == 4 && order2 == 4) {
- intersections.intersect(cubic1, cubic2);
- } else {
- intersections.reset();
- }
- SkIntersections intersections2;
- (void) intersections2.intersect(cubic1, cubic2);
- REPORTER_ASSERT(reporter, intersections.used() <= intersections2.used()
- || intersections[0][0] + 0.01 > intersections[0][1]);
- for (int index = 0; index < intersections2.used(); ++index) {
-// SkASSERT(intersections.pt(index).approximatelyEqual(intersections2.pt(index)));
- double tt1 = intersections2[0][index];
- SkDPoint xy1 = cubic1.ptAtT(tt1);
- double tt2 = intersections2[1][index];
- SkDPoint xy2 = cubic2.ptAtT(tt2);
- REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2));
- }
-}
-
-DEF_TEST(PathOpsCubicBinaryTest, reporter) {
- int outer = 0;
- int inner = outer + 1;
- do {
- const SkDCubic& cubic1 = testSet[outer];
- const SkDCubic& cubic2 = testSet[inner];
- binaryTest(cubic1, cubic2, reporter);
- inner += 2;
- outer += 2;
- } while (outer < (int) testSetCount);
-}
-
-DEF_TEST(PathOpsCubicBinaryNew, reporter) {
- int outer = 62;
- int inner = outer + 1;
- do {
- const SkDCubic& cubic1 = newTestSet[outer];
- const SkDCubic& cubic2 = newTestSet[inner];
- binaryTest(cubic1, cubic2, reporter);
- inner += 2;
- outer += 2;
- } while (outer < (int) newTestSetCount);
-}
-
-DEF_TEST(PathOpsCubicBinaryStd, reporter) {
- const int firstTest = 0;
- for (size_t index = firstTest; index < tests_count; ++index) {
- const SkDCubic& cubic1 = tests[index][0];
- const SkDCubic& cubic2 = tests[index][1];
- binaryTest(cubic1, cubic2, reporter);
- }
-}
-
-DEF_TEST(PathOpsCubicBinaryCoin, reporter) {
- int firstFail = 0;
- for (int index = firstFail; index < coinSetCount; index += 2) {
- const SkDCubic& cubic1 = coinSet[index];
- const SkDCubic& cubic2 = coinSet[index + 1];
- binaryTest(cubic1, cubic2, reporter);
- }
-}