Chromium Code Reviews| Index: tests/PathTest.cpp |
| diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
| index 1a74682e546e967ac322b61ba76ca1de9f2d7411..de7e4a65cc09864851290169f6a2464a39d84f41 100644 |
| --- a/tests/PathTest.cpp |
| +++ b/tests/PathTest.cpp |
| @@ -21,6 +21,26 @@ |
| #include "SkWriter32.h" |
| #include "Test.h" |
| +static void test_skbug_3239(skiatest::Reporter* reporter) { |
| + const SkRect rect = SkRect::MakeLTRB(SkBits2Float(0xcb7f16c8), /* -16717512.000000 */ |
| + SkBits2Float(0xcb7f16c8), /* -16717512.000000 */ |
| + SkBits2Float(0x4b7f1c1d), /* 16718877.000000 */ |
| + SkBits2Float(0x4b7f1bd7)); /* 16718807.000000 */ |
|
robertphillips
2014/12/15 19:13:21
Can we test the four variants having the huge radi
reed1
2014/12/15 19:58:28
Done.
|
| + const SkVector radii[] = { |
| + { 0, 0 }, |
| + { 0, 0 }, |
| + { 0, 0 }, |
| + { 33436320, 33436320 }, |
| + }; |
| + SkRRect rrect; |
| + rrect.setRectRadii(rect, radii); |
| + |
| + SkPath path; |
| + // this line should not assert in the debug build (from validate) |
| + path.addRRect(rrect); |
| + REPORTER_ASSERT(reporter, rrect.rect() == path.getBounds()); |
| +} |
| + |
| static void make_path_crbug364224(SkPath* path) { |
| path->reset(); |
| path->moveTo(3.747501373f, 2.724499941f); |
| @@ -3729,4 +3749,5 @@ DEF_TEST(Paths, reporter) { |
| PathRefTest_Private::TestPathRef(reporter); |
| test_dump(reporter); |
| test_path_crbugskia2820(reporter); |
| + test_skbug_3239(reporter); |
| } |