Index: tests/GrShapeTest.cpp |
diff --git a/tests/GrShapeTest.cpp b/tests/GrShapeTest.cpp |
index de08457dbacc8a123eae42f77cc3c935890026bd..f417310c86e725fbc28d84dd7d164de9c362e764 100644 |
--- a/tests/GrShapeTest.cpp |
+++ b/tests/GrShapeTest.cpp |
@@ -550,9 +550,23 @@ 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. |
+ 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(); |
robertphillips
2016/04/27 20:22:26
I don't think this check re emptyRRect is useful h
bsalomon
2016/04/27 20:26:46
Done.
|
+ REPORTER_ASSERT(reporter, emptyRRect.getType() == SkRRect::kEmpty_Type); |
+ TestCase dashAndStrokeEmptyRectCase(emptyRect, dashAndStroke); |
+ dashAndStrokeEmptyRectCase.compare(reporter, fillEmptyCase, |
+ TestCase::kAllSame_ComparisonExpecation); |
} |
DEF_TEST(GrShape, reporter) { |