diff options
author | reed <reed@chromium.org> | 2015-02-10 08:46:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-10 08:46:22 -0800 |
commit | 454fa71cc31bf45c14e4c0b25502d5332d76c51c (patch) | |
tree | 54f5bc37eaa2ba3cf69b1f5c386e7881b3f03885 /tests | |
parent | 88f0a99fd48cfb30ca5596182f8932d76cd76f17 (diff) |
check for nonfinites in rrects
BUG=457128
Review URL: https://codereview.chromium.org/913743002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PathTest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index a852bf0d10..d1c28ec0fb 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); |