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

Unified Diff: tests/PathMeasureTest.cpp

Issue 1602153002: fix circular dashing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix test Created 4 years, 11 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 | « src/core/SkPathMeasure.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathMeasureTest.cpp
diff --git a/tests/PathMeasureTest.cpp b/tests/PathMeasureTest.cpp
index 578f4eb74f9c2595632fb0ba9e6b90dd3fa5b6cc..df66578f1bf56927675fb12c8c71dc04a7934d49 100644
--- a/tests/PathMeasureTest.cpp
+++ b/tests/PathMeasureTest.cpp
@@ -201,3 +201,19 @@ DEF_TEST(PathMeasure, reporter) {
test_small_segment2();
test_small_segment3();
}
+
+DEF_TEST(PathMeasureConic, reporter) {
+ SkPoint stdP, hiP, pts[] = {{0,0}, {100,0}, {100,0}};
+ SkPath p;
+ p.moveTo(0, 0);
+ p.conicTo(pts[1], pts[2], 1);
+ SkPathMeasure stdm(p, false);
+ REPORTER_ASSERT(reporter, stdm.getPosTan(20, &stdP, nullptr));
+ p.reset();
+ p.moveTo(0, 0);
+ p.conicTo(pts[1], pts[2], 10);
+ stdm.setPath(&p, false);
+ REPORTER_ASSERT(reporter, stdm.getPosTan(20, &hiP, nullptr));
+ REPORTER_ASSERT(reporter, 19.5f < stdP.fX && stdP.fX < 20.5f);
+ REPORTER_ASSERT(reporter, 19.5f < hiP.fX && hiP.fX < 20.5f);
+}
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698