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

Unified Diff: tests/PathTest.cpp

Issue 913743002: check for nonfinites in rrects (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: update test for nonfinites Created 5 years, 10 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 | « src/core/SkRRect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index a852bf0d101e4cdd2e4711d4a9cf476cf6e9059f..d1c28ec0fb50ddb8ed21fdaebbf99bc2f3d7890e 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -3113,10 +3113,12 @@ static void test_rrect(skiatest::Reporter* reporter) {
rr.setRectRadii(largeR, radii);
p.addRRect(rr);
test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction);
+
+ // we check for non-finites
SkRect infR = {0, 0, SK_ScalarMax, SK_ScalarInfinity};
rr.setRectRadii(infR, radii);
- p.addRRect(rr);
- test_rrect_convexity_is_unknown(reporter, &p, SkPath::kCW_Direction);
+ REPORTER_ASSERT(reporter, rr.isEmpty());
+
SkRect tinyR = {0, 0, 1e-9f, 1e-9f};
p.addRoundRect(tinyR, 5e-11f, 5e-11f);
test_rrect_is_convex(reporter, &p, SkPath::kCW_Direction);
« no previous file with comments | « src/core/SkRRect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698