aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/SimplifyNew_Test.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-31 13:13:11 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-31 13:13:11 +0000
commit495f8e435b677f28913cd2adc8caa8d3d766dd17 (patch)
tree82e12d69aede9d11f1f0a0d3fe16e5bef72de430 /experimental/Intersection/SimplifyNew_Test.cpp
parent13f1b6f1569bb5c639ca762f6b153133173c6295 (diff)
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4089 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/SimplifyNew_Test.cpp')
-rw-r--r--experimental/Intersection/SimplifyNew_Test.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/experimental/Intersection/SimplifyNew_Test.cpp b/experimental/Intersection/SimplifyNew_Test.cpp
index 7fbe4d06cb..3a27bc10a6 100644
--- a/experimental/Intersection/SimplifyNew_Test.cpp
+++ b/experimental/Intersection/SimplifyNew_Test.cpp
@@ -45,14 +45,12 @@ static void addInnerCWTriangle(SkPath& path) {
path.close();
}
-#if DEBUG_UNUSED
static void addInnerCCWTriangle(SkPath& path) {
path.moveTo(3,0);
path.lineTo(2,1);
path.lineTo(4,1);
path.close();
}
-#endif
static void addOuterCWTriangle(SkPath& path) {
path.moveTo(3,0);
@@ -61,14 +59,12 @@ static void addOuterCWTriangle(SkPath& path) {
path.close();
}
-#if DEBUG_UNUSED
static void addOuterCCWTriangle(SkPath& path) {
path.moveTo(3,0);
path.lineTo(0,2);
path.lineTo(6,2);
path.close();
}
-#endif
static void testLine2() {
SkPath path, simple;
@@ -77,15 +73,38 @@ static void testLine2() {
testSimplifyx(path, simple, bitmap);
}
+static void testLine3() {
+ SkPath path, simple;
+ addInnerCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplifyx(path, simple, bitmap);
+}
+
+static void testLine4() {
+ SkPath path, simple;
+ addOuterCCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplifyx(path, simple, bitmap);
+}
+
+static void testLine5() {
+ SkPath path, simple;
+ addOuterCWTriangle(path);
+ addOuterCWTriangle(path);
+ testSimplifyx(path, simple, bitmap);
+}
static void (*tests[])() = {
testLine1,
testLine2,
+ testLine3,
+ testLine4,
+ testLine5
};
static const size_t testCount = sizeof(tests) / sizeof(tests[0]);
-static void (*firstTest)() = testLine2;
+static void (*firstTest)() = testLine5;
static bool skipAll = false;
void SimplifyNew_Test() {