check for numerical imprecision on phase
fixes http://code.google.com/p/chromium/issues/detail?id=124652
git-svn-id: http://skia.googlecode.com/svn/trunk@3761 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index 9bbb88f..e446755 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -8,6 +8,7 @@
#include "Test.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
+#include "SkDashPathEffect.h"
static SkCanvas* create(SkBitmap::Config config, int w, int h, int rb,
void* addr = NULL) {
@@ -46,6 +47,19 @@
#endif
}
+static void test_crbug_124652(skiatest::Reporter* reporter) {
+#ifdef SK_SCALAR_IS_FLOAT
+ /*
+ http://code.google.com/p/chromium/issues/detail?id=124652
+ This particular test/bug only applies to the float case, where
+ large values can "swamp" small ones.
+ */
+ SkScalar intervals[2] = {837099584, 33450};
+ SkAutoTUnref<SkDashPathEffect> dash(
+ new SkDashPathEffect(intervals, 2, -10, false));
+#endif
+}
+
static void test_bigcubic(skiatest::Reporter* reporter) {
#ifdef SK_SCALAR_IS_FLOAT
SkPath path;
@@ -80,6 +94,7 @@
test_giantaa(reporter);
test_bug533(reporter);
test_bigcubic(reporter);
+ test_crbug_124652(reporter);
}
#include "TestClassDef.h"