| 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);
|
| +}
|
|
|