Index: tests/PathTest.cpp |
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
index 3c4638d7415facd6e0da7f62aabb3ff128918b80..158f88d4e576eebce58630f86c6ac104fdae9b55 100644 |
--- a/tests/PathTest.cpp |
+++ b/tests/PathTest.cpp |
@@ -818,6 +818,23 @@ static void test_isfinite(skiatest::Reporter* reporter) { |
test_path_isfinite(reporter); |
} |
+static void test_isclosed(skiatest::Reporter* reporter) { |
+ SkPath path; |
+ REPORTER_ASSERT(reporter, !path.isClosed()); |
+ path.moveTo(0, 0); |
+ REPORTER_ASSERT(reporter, !path.isClosed()); |
+ path.close(); |
+ REPORTER_ASSERT(reporter, path.isClosed()); |
+ path.lineTo(100, 100); |
+ REPORTER_ASSERT(reporter, !path.isClosed()); |
+ path.moveTo(200, 200); |
+ REPORTER_ASSERT(reporter, !path.isClosed()); |
+ path.close(); |
+ REPORTER_ASSERT(reporter, path.isClosed()); |
+ path.moveTo(0, 0); |
+ REPORTER_ASSERT(reporter, !path.isClosed()); |
+} |
+ |
// assert that we always |
// start with a moveTo |
// only have 1 moveTo |
@@ -4005,6 +4022,7 @@ DEF_TEST(Paths, reporter) { |
test_addPoly(reporter); |
test_isfinite(reporter); |
test_isfinite_after_transform(reporter); |
+ test_isclosed(reporter); |
test_arb_round_rect_is_convex(reporter); |
test_arb_zero_rad_round_rect_is_rect(reporter); |
test_addrect(reporter); |