diff options
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r-- | tests/PathTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index bdd15fbfb3..77f47bed30 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -4911,3 +4911,18 @@ DEF_TEST(PathRefSerialization, reporter) { REPORTER_ASSERT(reporter, !bytesRead); } } + +DEF_TEST(NonFinitePathIteration, reporter) { + SkPath path; + path.moveTo(SK_ScalarInfinity, SK_ScalarInfinity); + + int verbs = 0; + + SkPath::RawIter iter(path); + SkPoint pts[4]; + while (iter.next(pts) != SkPath::kDone_Verb) { + verbs++; + } + + REPORTER_ASSERT(reporter, verbs == 0); +} |