aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r--tests/PathTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 464943b8dc..aa2ffdb32f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -3542,6 +3542,16 @@ static void test_contains(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, !p.contains(7, 7));
p.reset();
p.moveTo(4, 4);
+ p.lineTo(8, 4);
+ p.lineTo(8, 8);
+ p.lineTo(4, 8);
+ // test on vertices
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+ p.reset();
+ p.moveTo(4, 4);
p.lineTo(6, 8);
p.lineTo(2, 8);
// test on edge