aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsSimplifyFailTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-09-28 09:22:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-28 09:22:17 -0700
commite3a4e993ef79788d5ee807b10ff588e9c46bac6d (patch)
treeda042cd555a96f4fa5d8975e8fafeb20d7b75f26 /tests/PathOpsSimplifyFailTest.cpp
parent33069255769246c703e1fbdbe14a752c31d0ad1e (diff)
fix cubic linear test
Check to see if the line between end points is degenerate before measuring control points. Also, add test case for a bug to see if it shows up on any platform. TBR=reed@google.com BUG=skia:5169, skia:5240 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2375053002 Review-Url: https://codereview.chromium.org/2375053002
Diffstat (limited to 'tests/PathOpsSimplifyFailTest.cpp')
-rw-r--r--tests/PathOpsSimplifyFailTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/PathOpsSimplifyFailTest.cpp b/tests/PathOpsSimplifyFailTest.cpp
index 359b12592b..fa168d9520 100644
--- a/tests/PathOpsSimplifyFailTest.cpp
+++ b/tests/PathOpsSimplifyFailTest.cpp
@@ -87,10 +87,8 @@ static void dontFailOne(skiatest::Reporter* reporter, int index) {
SkPath result;
result.setFillType(SkPath::kWinding_FillType);
bool success = Simplify(path, &result);
- if (index != 17 && index != 31 && index != 38) { // cubic fails to chop in two without creating NaNs
- REPORTER_ASSERT(reporter, success);
- REPORTER_ASSERT(reporter, result.getFillType() != SkPath::kWinding_FillType);
- }
+ REPORTER_ASSERT(reporter, success);
+ REPORTER_ASSERT(reporter, result.getFillType() != SkPath::kWinding_FillType);
reporter->bumpTestCount();
}