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

Unified Diff: tests/PathOpsOpTest.cpp

Issue 75453003: optimize pathops coverage (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused code now that testing is complete Created 7 years, 1 month 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
Index: tests/PathOpsOpTest.cpp
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index e18d79eb12b638de0a5d9cabc593c542881ae5b3..b333dbc2e0d70972e192309ed4b2b80befc49167 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -3036,9 +3036,51 @@ static void cubicOp98x(skiatest::Reporter* reporter) {
testPathOp(reporter, path, pathB, kXOR_PathOp);
}
-static void (*firstTest)(skiatest::Reporter* ) = bufferOverflow;
-
-static struct TestDesc tests[] = {
+static void cubicOp99(skiatest::Reporter* reporter) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(3,6);
+ path.cubicTo(0,3, 6,5, 5,4);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(5,6);
+ pathB.cubicTo(4,5, 6,3, 3,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_PathOp);
+}
+
+static void cubicOp100(skiatest::Reporter* reporter) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0,1);
+ path.cubicTo(0,2, 2,1, 4,2);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1,2);
+ pathB.cubicTo(2,4, 1,0, 2,0);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kDifference_PathOp);
+}
+
+static void cubicOp101(skiatest::Reporter* reporter) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(0, 1);
+ path.cubicTo(2, 3, 2, 1, 5, 3);
+ path.close();
+ pathB.setFillType(SkPath::kWinding_FillType);
+ pathB.moveTo(1, 2);
+ pathB.cubicTo(3, 5, 1, 0, 3, 2);
+ pathB.close();
+ testPathOp(reporter, path, pathB, kIntersect_PathOp);
+}
+
+static void (*firstTest)(skiatest::Reporter* ) = 0;
+
+static struct TestDesc tests[] = {
+ TEST(cubicOp101),
+ TEST(cubicOp100),
+ TEST(cubicOp99),
#if ISSUE_1435_WORKING
TEST(issue1435),
#endif

Powered by Google App Engine
This is Rietveld 408576698