aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsSimplifyTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-07-23 12:40:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-23 12:40:22 -0700
commitd4349723fac9c0fd4dcf8c275fb7c756bdfdff7b (patch)
tree20a850a4c02da163ac18a888494813fccc6f1862 /tests/PathOpsSimplifyTest.cpp
parenta0170f10aadca337fc412953f3409eb368c6964b (diff)
fix path ops fuzz buster
Mark collapsed segments as done and remove collapsed segment references from the coincidence array. Also add test names to global debugging. R=fmalita@chromium.org BUG=512592 Review URL: https://codereview.chromium.org/1250293002
Diffstat (limited to 'tests/PathOpsSimplifyTest.cpp')
-rw-r--r--tests/PathOpsSimplifyTest.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp
index 5b763dee83..165ee8d11d 100644
--- a/tests/PathOpsSimplifyTest.cpp
+++ b/tests/PathOpsSimplifyTest.cpp
@@ -4810,11 +4810,76 @@ static void testQuads65(skiatest::Reporter* reporter,const char* filename) {
testSimplify(reporter, path, filename);
}
+static void fuzz864a(skiatest::Reporter* reporter,const char* filename) {
+ SkPath path;
+ path.moveTo(10, 90);
+ path.lineTo(10, 90);
+ path.lineTo(10, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(10, 90);
+ path.lineTo(10, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 30);
+ path.lineTo(32678, 30);
+ path.lineTo(32678, 30);
+ path.lineTo(10, 30);
+ path.close();
+ path.moveTo(10, 3.35545e+07f);
+ path.lineTo(110, 3.35545e+07f);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 3.35545e+07f);
+ path.close();
+ path.moveTo(10, 315);
+ path.lineTo(110, 315);
+ path.lineTo(110, 255);
+ path.lineTo(10, 255);
+ path.lineTo(10, 315);
+ path.close();
+ path.moveTo(0, 60);
+ path.lineTo(100, 60);
+ path.lineTo(100, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 60);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ path.moveTo(10, 3.35545e+07f);
+ path.lineTo(110, 3.35545e+07f);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 3.35545e+07f);
+ path.close();
+ path.moveTo(10, 90);
+ path.lineTo(110, 90);
+ path.lineTo(110, 30);
+ path.lineTo(10, 30);
+ path.lineTo(10, 90);
+ path.close();
+ testSimplify(reporter, path, filename);
+}
+
static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
static TestDesc tests[] = {
+ TEST(fuzz864a),
TEST(testQuads65),
TEST(testIssue3838_3),
TEST(testIssue3838),