aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-04-17 11:53:34 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-17 16:42:04 +0000
commit1cd6098d52a531451f194437861cd7a548f825a7 (patch)
tree2b00127b616df01c3038c5c5661968ebe87bb71d /tests
parenta580fb3f9ec5c177e4e8f827f6aa14239f984121 (diff)
path is rect bug number twelve
Exposes that final close along a diagonal need not include a close verb if the subsequent verb is move; so we have to check for a diagonal then. The later check for diagonal included a comment that it may not be needed which does appear to be the case. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I17a9414e8b3e69b82c2eda28195696eae4e3d513 Reviewed-on: https://skia-review.googlesource.com/121801 Commit-Queue: Cary Clark <caryclark@skia.org> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/PathTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 817aa82b75..d7b38d87e1 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -5012,4 +5012,10 @@ DEF_TEST(Path_isRect, reporter) {
REPORTER_ASSERT(reporter, path.isRect(&rect, nullptr, nullptr));
compare.set(&points31[0], 4);
REPORTER_ASSERT(reporter, rect == compare);
+ // isolated from skbug.com/7792#c36
+ SkPath::Verb verbs36[] = { SkPath::kMove_Verb, SkPath::kLine_Verb, SkPath::kLine_Verb,
+ SkPath::kLine_Verb, SkPath::kMove_Verb, SkPath::kLine_Verb };
+ SkPoint points36[] = { {75, 75}, {150, 75}, {150, 150}, {10, 150}, {75, 75}, {75, 75} };
+ path = makePath2(points36, verbs36, SK_ARRAY_COUNT(verbs36));
+ REPORTER_ASSERT(reporter, !path.isRect(&rect, nullptr, nullptr));
}