Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: tests/PathTest.cpp

Issue 971773002: treat backwards quads as not convex (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add fall through comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index a868d93d78c3c6e740f548dae88377ee47bc9ddd..9ce5a5c442bad8e81be5870942fc8ffc630d8b51 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -38,6 +38,14 @@ static void test_add_rrect(skiatest::Reporter* reporter, const SkRect& bounds,
REPORTER_ASSERT(reporter, bounds == path.getBounds());
}
+static void test_skbug_3469(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(20, 20);
+ path.quadTo(20, 50, 80, 50);
+ path.quadTo(20, 50, 20, 80);
+ REPORTER_ASSERT(reporter, !path.isConvex());
+}
+
static void test_skbug_3239(skiatest::Reporter* reporter) {
const float min = SkBits2Float(0xcb7f16c8); /* -16717512.000000 */
const float max = SkBits2Float(0x4b7f1c1d); /* 16718877.000000 */
@@ -3732,5 +3740,6 @@ DEF_TEST(Paths, reporter) {
PathRefTest_Private::TestPathRef(reporter);
test_dump(reporter);
test_path_crbugskia2820(reporter);
+ test_skbug_3469(reporter);
test_skbug_3239(reporter);
}
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698