| Index: tests/PathOpsTightBoundsTest.cpp
|
| diff --git a/tests/PathOpsTightBoundsTest.cpp b/tests/PathOpsTightBoundsTest.cpp
|
| index 953756170bd0ea9490e0de8aa044f10ee2ce0fe2..140e280893bf7f47548bdd657b33304ed3a631e0 100644
|
| --- a/tests/PathOpsTightBoundsTest.cpp
|
| +++ b/tests/PathOpsTightBoundsTest.cpp
|
| @@ -120,3 +120,48 @@ DEF_TEST(PathOpsTightBoundsQuads, reporter) {
|
| }
|
| testRunner.render();
|
| }
|
| +
|
| +DEF_TEST(PathOpsTightBoundsMove, reporter) {
|
| + SkPath path;
|
| + path.moveTo(10, 10);
|
| + path.close();
|
| + path.moveTo(20, 20);
|
| + path.lineTo(20, 20);
|
| + path.close();
|
| + path.moveTo(15, 15);
|
| + path.lineTo(15, 15);
|
| + path.close();
|
| + const SkRect& bounds = path.getBounds();
|
| + SkRect tight;
|
| + REPORTER_ASSERT(reporter, TightBounds(path, &tight));
|
| + REPORTER_ASSERT(reporter, bounds == tight);
|
| +}
|
| +
|
| +DEF_TEST(PathOpsTightBoundsMoveOne, reporter) {
|
| + SkPath path;
|
| + path.moveTo(20, 20);
|
| + const SkRect& bounds = path.getBounds();
|
| + SkRect tight;
|
| + REPORTER_ASSERT(reporter, TightBounds(path, &tight));
|
| + REPORTER_ASSERT(reporter, bounds == tight);
|
| +}
|
| +
|
| +DEF_TEST(PathOpsTightBoundsMoveTwo, reporter) {
|
| + SkPath path;
|
| + path.moveTo(20, 20);
|
| + path.moveTo(40, 40);
|
| + const SkRect& bounds = path.getBounds();
|
| + SkRect tight;
|
| + REPORTER_ASSERT(reporter, TightBounds(path, &tight));
|
| + REPORTER_ASSERT(reporter, bounds == tight);
|
| +}
|
| +
|
| +DEF_TEST(PathOpsTightBoundsTiny, reporter) {
|
| + SkPath path;
|
| + path.moveTo(1, 1);
|
| + path.quadTo(1.000001f, 1, 1, 1);
|
| + const SkRect& bounds = path.getBounds();
|
| + SkRect tight;
|
| + REPORTER_ASSERT(reporter, TightBounds(path, &tight));
|
| + REPORTER_ASSERT(reporter, bounds == tight);
|
| +}
|
|
|