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

Unified Diff: tests/PathOpsOpTest.cpp

Issue 252243003: fix cubic/line intersection; add skp tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bracket new test correctly Created 6 years, 8 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/PathOpsExtendedTest.cpp ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsOpTest.cpp
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index 7a1cbab5e3926782f42ffdb8ca063402e2a88703..89611f18f33de09dc5d617e3cca80a21eb16bbdc 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -3310,10 +3310,30 @@ static void quadOp10i(skiatest::Reporter* reporter, const char* filename) {
testPathOp(reporter, path, pathB, kIntersect_PathOp, filename);
}
+static void kari1(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(39.9375, -5.8359375);
+ path1.lineTo(40.625, -5.7890625);
+ path1.lineTo(37.7109375, 1.3515625);
+ path1.lineTo(37.203125, 0.9609375);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(37.52734375f, -1.44140625f);
+ path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3984375f, -2.765625f);
+ path2.lineTo(38.640625f, -2.609375f);
+ path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040657043f, 38.0664443969727f, -0.154893040657043f);
+ path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.18359375f, 37.52734375, -1.44140625f);
+ path2.close();
+
+ testPathOp(reporter, path1, path2, kDifference_PathOp, filename);
+}
+
static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
static struct TestDesc tests[] = {
+ TEST(kari1),
TEST(quadOp10i),
#if 0 // FIXME: serpentine curve is ordered the wrong way
TEST(cubicOp114),
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698