Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: tests/PathOpsLineIntersectionTest.cpp

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsLineIntersectionTest.cpp
diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp
index 98851786031cf22df3084faeae1ba6c744bfb00e..22dc9d8f6077ca4a7f9695e9ddebbe3dbe447d73 100644
--- a/tests/PathOpsLineIntersectionTest.cpp
+++ b/tests/PathOpsLineIntersectionTest.cpp
@@ -50,7 +50,10 @@ static const SkDLine noIntersect[][2] = {
static const size_t noIntersect_count = SK_ARRAY_COUNT(noIntersect);
static const SkDLine coincidentTests[][2] = {
- {{{{0,482.5}, {-4.4408921e-016,682.5}}},
+ {{{ { 10105, 2510 }, { 10123, 2509.98999f } }},
+ {{{10105, 2509.98999f}, { 10123, 2510 } }}},
+
+ {{ { { 0, 482.5 }, { -4.4408921e-016, 682.5 } } },
{{{0,683}, {0,482}}}},
{{{{1.77635684e-015,312}, {-1.24344979e-014,348}}},
@@ -76,9 +79,12 @@ static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, co
for (int i = 0; i < ts.used(); ++i) {
SkDPoint result1 = line1.ptAtT(ts[0][i]);
SkDPoint result2 = line2.ptAtT(ts[1][i]);
- if (!result1.approximatelyEqual(result2)) {
+ if (!result1.approximatelyEqual(result2) && !ts.nearlySame(i)) {
REPORTER_ASSERT(reporter, ts.used() != 1);
result2 = line2.ptAtT(ts[1][i ^ 1]);
+ if (!result1.approximatelyEqual(result2)) {
+ SkDebugf(".");
+ }
REPORTER_ASSERT(reporter, result1.approximatelyEqual(result2));
REPORTER_ASSERT(reporter, result1.approximatelyEqual(ts.pt(i).asSkPoint()));
}
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698