From d4349723fac9c0fd4dcf8c275fb7c756bdfdff7b Mon Sep 17 00:00:00 2001 From: caryclark Date: Thu, 23 Jul 2015 12:40:22 -0700 Subject: 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 --- tests/PathOpsSimplifyTest.cpp | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'tests/PathOpsSimplifyTest.cpp') 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), -- cgit v1.2.3