diff options
author | 2013-07-15 20:50:24 +0000 | |
---|---|---|
committer | 2013-07-15 20:50:24 +0000 | |
commit | 5ec2b1ee8a8265c0d46092c801407073f46b3451 (patch) | |
tree | 93c41029cfc631627846aa11a61c0c01dd3a4113 /tests | |
parent | e05e75eda103cad9e6727202997ed6e0d88ab183 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PathOpsCubicIntersectionTest.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp index 7be7b28a39..4cac2d07ec 100644 --- a/tests/PathOpsCubicIntersectionTest.cpp +++ b/tests/PathOpsCubicIntersectionTest.cpp @@ -306,17 +306,15 @@ static void oneOff(skiatest::Reporter* reporter, const SkDCubic& cubic1, const S 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 @@ static void oneOffTests(skiatest::Reporter* reporter) { } 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); } } } |