aboutsummaryrefslogtreecommitdiff
path: root/tests/PathOpsSimplifyTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PathOpsSimplifyTest.cpp')
-rw-r--r--tests/PathOpsSimplifyTest.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp
index e9133ef8ea..356f1723b6 100644
--- a/tests/PathOpsSimplifyTest.cpp
+++ b/tests/PathOpsSimplifyTest.cpp
@@ -3626,9 +3626,37 @@ static void testQuadratic97(skiatest::Reporter* reporter) {
testSimplify(reporter, path);
}
+static void testTriangles1(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 2);
+ path.lineTo(1, 1);
+ path.close();
+ testSimplify(reporter, path);
+}
+
+static void testTriangles2(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(1, 1);
+ path.lineTo(2, 3);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path);
+}
+
static void (*firstTest)(skiatest::Reporter* ) = 0;
static TestDesc tests[] = {
+ TEST(testTriangles2),
+ TEST(testTriangles1),
TEST(testQuadratic97),
TEST(testQuadratic96),
TEST(testQuadratic95),