| Index: tests/PathTest.cpp
|
| diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
|
| index 33d8da441992925a7032f03b33f326cc55ba5ac4..9158c57137fd5cb9c7a6d04204e53c1f9b201d12 100644
|
| --- a/tests/PathTest.cpp
|
| +++ b/tests/PathTest.cpp
|
| @@ -1443,6 +1443,7 @@ static void test_isRect_open_close(skiatest::Reporter* reporter) {
|
| REPORTER_ASSERT(reporter, path.isRect(NULL, NULL));
|
| REPORTER_ASSERT(reporter, path.isRect(&isClosed, NULL));
|
| REPORTER_ASSERT(reporter, isClosed);
|
| + REPORTER_ASSERT(reporter, SkPath::kFill_PathAsRect == path.asRect(NULL));
|
| }
|
|
|
| // Simple isRect test is inline TestPath, below.
|
| @@ -1560,6 +1561,15 @@ static void test_isRect(skiatest::Reporter* reporter) {
|
| REPORTER_ASSERT(reporter, path.isRect(&isClosed, &direction));
|
| REPORTER_ASSERT(reporter, isClosed == tests[testIndex].fClose);
|
| REPORTER_ASSERT(reporter, direction == cheapDirection);
|
| + direction = (SkPath::Direction) -1;
|
| + if (tests[testIndex].fClose) {
|
| + REPORTER_ASSERT(reporter, SkPath::kFill_PathAsRect == path.asRect());
|
| + REPORTER_ASSERT(reporter, SkPath::kFill_PathAsRect == path.asRect(&direction));
|
| + } else {
|
| + REPORTER_ASSERT(reporter, SkPath::kStroke_PathAsRect == path.asRect());
|
| + REPORTER_ASSERT(reporter, SkPath::kStroke_PathAsRect == path.asRect(&direction));
|
| + }
|
| + REPORTER_ASSERT(reporter, direction == cheapDirection);
|
| } else {
|
| SkRect computed;
|
| computed.set(123, 456, 789, 1011);
|
| @@ -1572,6 +1582,9 @@ static void test_isRect(skiatest::Reporter* reporter) {
|
| REPORTER_ASSERT(reporter, !path.isRect(&isClosed, &direction));
|
| REPORTER_ASSERT(reporter, isClosed == (bool) -1);
|
| REPORTER_ASSERT(reporter, direction == (SkPath::Direction) -1);
|
| + REPORTER_ASSERT(reporter, SkPath::kNone_PathAsRect == path.asRect());
|
| + REPORTER_ASSERT(reporter, SkPath::kNone_PathAsRect == path.asRect(&direction));
|
| + REPORTER_ASSERT(reporter, direction == (SkPath::Direction) -1);
|
| }
|
| }
|
|
|
|
|