add (temporary) diagnostic code for normalize test
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 3 May 2013 18:11:00 +0000 (18:11 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 3 May 2013 18:11:00 +0000 (18:11 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@8994 2bbb7eff-a529-9590-31e7-b0007b416f81

tests/PointTest.cpp

index b909762..f8a3963 100644 (file)
@@ -68,7 +68,11 @@ static void test_overflow(skiatest::Reporter* reporter) {
     SkPoint pt = { bigFloat, bigFloat };
     
     SkScalar length = pt.length();
-    REPORTER_ASSERT(reporter, !SkScalarIsFinite(length));
+    // expect this to be non-finite, but dump the results if not.
+    if (SkScalarIsFinite(length)) {
+        SkDebugf("length(%g, %g) == %g\n", pt.fX, pt.fY, length);
+        REPORTER_ASSERT(reporter, !SkScalarIsFinite(length));
+    }
 
     // this should succeed, even though we can't represent length
     REPORTER_ASSERT(reporter, pt.setLength(SK_Scalar1));