call newOneOff instead of oneOff
calling the latter instead of the former walked off the end of the
array causing mysterious bugs
TODO: safeguard against NaNs in the input
BUG=
Review URL: https://codereview.chromium.org/19280002
git-svn-id: http://skia.googlecode.com/svn/trunk@10093 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp
index 7be7b28..4cac2d0 100644
--- a/tests/PathOpsCubicIntersectionTest.cpp
+++ b/tests/PathOpsCubicIntersectionTest.cpp
@@ -306,17 +306,15 @@
xy1 = cubic1.xyAtT(tt1);
tt2 = intersections[1][pt3];
xy2 = cubic2.xyAtT(tt2);
+ const SkDPoint& iPt = intersections.pt(pt3);
#if ONE_OFF_DEBUG
- DEBUGCODE(const SkDPoint& iPt = intersections.pt(pt3);)
SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1.9g\n",
__FUNCTION__, tt1, xy1.fX, xy1.fY, iPt.fX,
iPt.fY, xy2.fX, xy2.fY, tt2);
#endif
-#if 0
REPORTER_ASSERT(reporter, xy1.approximatelyEqual(iPt));
REPORTER_ASSERT(reporter, xy2.approximatelyEqual(iPt));
REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2));
-#endif
}
}
@@ -340,7 +338,7 @@
}
for (size_t outer = 0; outer < newTestSetCount - 1; ++outer) {
for (size_t inner = outer + 1; inner < newTestSetCount; ++inner) {
- oneOff(reporter, outer, inner);
+ newOneOff(reporter, outer, inner);
}
}
}