shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4726 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/SimplifyNew_Test.cpp b/experimental/Intersection/SimplifyNew_Test.cpp
index b730466..888f59e 100644
--- a/experimental/Intersection/SimplifyNew_Test.cpp
+++ b/experimental/Intersection/SimplifyNew_Test.cpp
@@ -518,12 +518,48 @@
testSimplifyx(path);
}
-static void (*firstTest)() = testLine51;
+static void testLine52() {
+ SkPath path, simple;
+ path.addRect(0, 30, 20, 20, (SkPath::Direction) 0);
+ path.addRect(6, 20, 18, 30, (SkPath::Direction) 0);
+ path.addRect(32, 0, 36, 41, (SkPath::Direction) 0);
+ testSimplifyx(path);
+}
+
+static void testLine53() {
+ SkPath path, simple;
+ path.addRect(10, 30, 30, 30, (SkPath::Direction) 0);
+ path.addRect(12, 20, 24, 30, (SkPath::Direction) 0);
+ path.addRect(12, 32, 21, 36, (SkPath::Direction) 1);
+ testSimplifyx(path);
+}
+
+static void testLine54() {
+ SkPath path, simple;
+ path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
+ path.addRect(6, 0, 18, 18, (SkPath::Direction) 0);
+ path.addRect(8, 4, 17, 17, (SkPath::Direction) 1);
+ testSimplifyx(path);
+}
+
+static void testLine55() {
+ SkPath path, simple;
+ path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
+ path.addRect(6, 6, 18, 18, (SkPath::Direction) 0);
+ path.addRect(4, 4, 13, 13, (SkPath::Direction) 1);
+ testSimplifyx(path);
+}
+
+static void (*firstTest)() = 0;
static struct {
void (*fun)();
const char* str;
} tests[] = {
+ TEST(testLine55),
+ TEST(testLine54),
+ TEST(testLine53),
+ TEST(testLine52),
TEST(testLine51),
TEST(testLine50),
TEST(testLine49),
@@ -592,18 +628,18 @@
gDebugMaxWindSum = 3;
gDebugMaxWindValue = 3;
#endif
- size_t index = 0;
+ size_t index = testCount - 1;
if (firstTest) {
- while (index < testCount && tests[index].fun != firstTest) {
- ++index;
+ while (index > 0 && tests[index].fun != firstTest) {
+ --index;
}
}
bool firstTestComplete = false;
- for ( ; index < testCount; ++index) {
- SkDebugf("%s [%s]\n", __FUNCTION__, tests[index].str);
+ do {
+ SkDebugf(" %s [%s]\n", __FUNCTION__, tests[index].str);
(*tests[index].fun)();
firstTestComplete = true;
- }
+ } while (index--);
#ifdef SK_DEBUG
gDebugMaxWindSum = SK_MaxS32;
gDebugMaxWindValue = SK_MaxS32;