Chromium Code Reviews| Index: tests/GrShapeTest.cpp |
| diff --git a/tests/GrShapeTest.cpp b/tests/GrShapeTest.cpp |
| index de08457dbacc8a123eae42f77cc3c935890026bd..23389fcc237f0e9b6e3109d27ea17e6f5c5d931b 100644 |
| --- a/tests/GrShapeTest.cpp |
| +++ b/tests/GrShapeTest.cpp |
| @@ -550,9 +550,22 @@ void test_empty_shape(skiatest::Reporter* reporter) { |
| dashAndStroke.setPathEffect(make_dash()); |
| dashAndStroke.setStrokeWidth(2.f); |
| dashAndStroke.setStyle(SkPaint::kStroke_Style); |
| - TestCase dashAndStrokeEmptyCase(emptyPath3, stroke); |
| + TestCase dashAndStrokeEmptyCase(emptyPath3, dashAndStroke); |
| dashAndStrokeEmptyCase.compare(reporter, fillEmptyCase, |
| TestCase::kAllSame_ComparisonExpecation); |
| + |
| + // A shape made from a empty rrect should behave the same as an empty path. |
|
egdaniel
2016/04/28 13:06:10
picky nit: a -> an
bsalomon
2016/04/28 14:20:09
Done.
|
| + SkRRect emptyRRect = SkRRect::MakeRect(SkRect::MakeEmpty()); |
| + REPORTER_ASSERT(reporter, emptyRRect.getType() == SkRRect::kEmpty_Type); |
| + TestCase dashAndStrokeEmptyRRectCase(emptyRRect, dashAndStroke); |
| + dashAndStrokeEmptyRRectCase.compare(reporter, fillEmptyCase, |
| + TestCase::kAllSame_ComparisonExpecation); |
| + |
| + // Same for a rect. |
| + SkRect emptyRect = SkRect::MakeEmpty(); |
| + TestCase dashAndStrokeEmptyRectCase(emptyRect, dashAndStroke); |
| + dashAndStrokeEmptyRectCase.compare(reporter, fillEmptyCase, |
| + TestCase::kAllSame_ComparisonExpecation); |
| } |
| DEF_TEST(GrShape, reporter) { |