Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: tests/PathOpsSimplifyTest.cpp

Issue 14798004: path ops -- fix skp bugs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsQuadLineIntersectionTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsSimplifyTest.cpp
===================================================================
--- tests/PathOpsSimplifyTest.cpp (revision 9040)
+++ tests/PathOpsSimplifyTest.cpp (working copy)
@@ -3695,9 +3695,92 @@
testSimplify(reporter, path);
}
+static void testQuad2(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(2, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+}
+
+static void testQuad3(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(1, 0);
+ path.quadTo(0, 1, 3, 2);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(1, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path);
+}
+
+static void testQuad4(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.close();
+ testSimplify(reporter, path);
+}
+
+static void testQuad5(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path);
+}
+
+static void testQuad6(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(2, 0);
+ path.quadTo(0, 1, 2, 2);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(2, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.close();
+ testSimplify(reporter, path);
+}
+
+static void testQuad7(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(3, 0);
+ path.quadTo(0, 1, 1, 1);
+ path.lineTo(1, 3);
+ path.close();
+ path.moveTo(1, 0);
+ path.lineTo(3, 0);
+ path.quadTo(0, 1, 1, 2);
+ path.close();
+ testSimplify(reporter, path);
+}
+
static void (*firstTest)(skiatest::Reporter* ) = 0;
static TestDesc tests[] = {
+ TEST(testQuad7),
+ TEST(testQuad6),
+ TEST(testQuad5),
+ TEST(testQuad4),
+ TEST(testQuad3),
+ TEST(testQuad2),
TEST(testAddTCoincident2),
TEST(testAddTCoincident1),
TEST(testTriangles2),
@@ -3707,7 +3790,7 @@
TEST(testQuadratic95),
TEST(testQuadratic94),
TEST(testQuadralateral2),
- TEST(testQuad1), // FIXME: fails, need to investigate
+ TEST(testQuad1),
TEST(testCubic2),
TEST(testCubic1),
TEST(testQuadralateral1),
« no previous file with comments | « tests/PathOpsQuadLineIntersectionTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698