Chromium Code Reviews| Index: tests/PathTest.cpp |
| diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
| index e872b0c839699f307c70f2e3ace1b3c3256da35a..9e8cade5a442cde405987fb110debae12bf49ff8 100644 |
| --- a/tests/PathTest.cpp |
| +++ b/tests/PathTest.cpp |
| @@ -3060,6 +3060,22 @@ static void test_addPath(skiatest::Reporter* reporter) { |
| REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected); |
| } |
| +static void test_joinPath(skiatest::Reporter* reporter) { |
| + SkPath p, q; |
| + p.moveTo(1, 1); |
| + p.lineTo(1, 2); |
| + q.moveTo(2, 1); |
| + q.lineTo(2, 2); |
| + p.addPath(q, SkPath::kJoin_AddPathMode); |
|
reed1
2014/02/07 17:13:06
Seems like we should have parallel tests for both
|
| + uint8_t verbs[4]; |
| + int verbcount = p.getVerbs(verbs, 4); |
| + REPORTER_ASSERT(reporter, verbcount == 4); |
| + REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb); |
| + REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb); |
| + REPORTER_ASSERT(reporter, verbs[2] == SkPath::kLine_Verb); |
| + REPORTER_ASSERT(reporter, verbs[3] == SkPath::kLine_Verb); |
| +} |
| + |
| static void test_conicTo_special_case(skiatest::Reporter* reporter) { |
| SkPath p; |
| p.conicTo(1, 2, 3, 4, -1); |
| @@ -3377,6 +3393,7 @@ DEF_TEST(Paths, reporter) { |
| test_arc(reporter); |
| test_arcTo(reporter); |
| test_addPath(reporter); |
| + test_joinPath(reporter); |
| test_conicTo_special_case(reporter); |
| test_get_point(reporter); |
| test_contains(reporter); |