aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-01-26 11:03:50 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-26 16:32:19 +0000
commit0c0da2b0e21e37c33ae577e0af3e921df320ce5b (patch)
treeded43e968a17ad874b72ace4e33f4bbdd9c77c05 /tests
parent964dec3948721808491b21b4ff4ff41a466443ec (diff)
add test for big cubic -- currently disabled
BUG=skia: Change-Id: Ief11a1e54d427b1241b47f3cfab5b44fb656443a Reviewed-on: https://skia-review.googlesource.com/7607 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/PathTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index bdc99e34a8..3ddacb0164 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4501,6 +4501,20 @@ DEF_TEST(PathInterp, reporter) {
test_interp(reporter);
}
+#include "SkSurface.h"
+DEF_TEST(PathBigCubic, reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+ path.moveTo(SkBits2Float(0x44000000), SkBits2Float(0x373938b8)); // 512, 1.10401e-05f
+ path.cubicTo(SkBits2Float(0x00000001), SkBits2Float(0xdf000052), SkBits2Float(0x00000100), SkBits2Float(0x00000000), SkBits2Float(0x00000100), SkBits2Float(0x00000000)); // 1.4013e-45f, -9.22346e+18f, 3.58732e-43f, 0, 3.58732e-43f, 0
+ path.moveTo(0, 512);
+
+ // this call should not assert
+ if (false) {
+ SkSurface::MakeRasterN32Premul(255, 255, nullptr)->getCanvas()->drawPath(path, SkPaint());
+ }
+}
+
DEF_TEST(PathContains, reporter) {
test_contains(reporter);
}