aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsExtendedTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-04-29 08:28:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-29 08:28:30 -0700
commitaec251012542e971100e218bf463adbfb5d21d20 (patch)
tree16c2e84c2d59d94b75d7d2bc50fec53c0e38a898 /tests/PathOpsExtendedTest.cpp
parent97fdea6c4393cf0102d7eee5790782509fb4f57b (diff)
minor fixes to cubics code and overall alignment of how bounds and tops are computed for all curve types
All but 17 extended tests work. A helper function is privately added to SkPath.h to permit a test to modify a given point in a path. BUG=skia:3588 Review URL: https://codereview.chromium.org/1107353004
Diffstat (limited to 'tests/PathOpsExtendedTest.cpp')
-rw-r--r--tests/PathOpsExtendedTest.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 92b0e87465..9c57797987 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -289,7 +289,7 @@ int comparePaths(skiatest::Reporter* reporter, const char* filename, const SkPat
return errors2x2 > MAX_ERRORS ? errors2x2 : 0;
}
-const int gTestFirst = 20;
+const int gTestFirst = 41;
static int gTestNo = gTestFirst;
static SkTDArray<SkPathOp> gTestOp;
@@ -309,7 +309,7 @@ static void showPathOpPath(const char* testName, const SkPath& one, const SkPath
SkPathOpsDebug::ShowOnePath(b, "pathB", false);
SkDebugf(" testPathOp(reporter, path, pathB, %s, filename);\n", opStrs[shapeOp]);
SkDebugf("}\n");
- drawAsciiPaths(scaledOne, scaledTwo, true);
+ drawAsciiPaths(scaledOne, scaledTwo, false);
}
void ShowTestArray(const char* testName) {
@@ -341,9 +341,10 @@ static int comparePaths(skiatest::Reporter* reporter, const char* testName, cons
}
if (errors2x2 > MAX_ERRORS) {
SkAutoMutexAcquire autoM(compareDebugOut3);
- SkDebugf("\n*** this test fails ***\n");
showPathOpPath(testName, one, two, a, b, scaledOne, scaledTwo, shapeOp, scale);
+ SkDebugf("\n/*");
REPORTER_ASSERT(reporter, 0);
+ SkDebugf(" */\n");
} else if (errors2x2 == MAX_ERRORS || errors2x2 == MAX_ERRORS - 1) {
SkAutoMutexAcquire autoM(compareDebugOut4);
showPathOpPath(testName, one, two, a, b, scaledOne, scaledTwo, shapeOp, scale);
@@ -531,9 +532,6 @@ static bool innerPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP
scaledOut.setFillType(out.getFillType());
int result = comparePaths(reporter, testName, pathOut, scaledPathOut, out, scaledOut, bitmap,
a, b, shapeOp, scale, expectSuccess);
- if (result) {
- REPORTER_ASSERT(reporter, 0);
- }
reporter->bumpTestCount();
return result == 0;
}