Another fix for fixed point (nan == nan in fixed pt)
git-svn-id: http://skia.googlecode.com/svn/trunk@3491 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 316e670..5920eef 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -39,7 +39,6 @@
bool cheapEqual = a.cheapEqualTo(b);
if (equal != cheapEqual) {
#if SK_SCALAR_IS_FLOAT
- if (equal) {
bool foundZeroSignDiff = false;
for (int i = 0; i < 9; ++i) {
float aVal = a.get(i);
@@ -291,7 +290,12 @@
mat.reset();
mat.set(SkMatrix::kMSkewX, SK_ScalarNaN);
mat2.set(SkMatrix::kMSkewX, SK_ScalarNaN);
+ // fixed pt doesn't have the property that NaN does not equal itself.
+#ifdef SK_SCALAR_IS_FIXED
+ REPORTER_ASSERT(reporter, are_equal(reporter, mat, mat2));
+#else
REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2));
+#endif
test_matrix_max_stretch(reporter);
}