aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/MatrixTest.cpp
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-09 02:24:26 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-09 02:24:26 +0000
commitd41344553163085bfcfaf7d5882c6028934f8e3b (patch)
tree5dd30ae71a99eeb6bf4ffd812ae36313d5c5a160 /tests/MatrixTest.cpp
parent337490d4ae0138e93eff01ded76b1140d105a023 (diff)
update to work correctly for scalar == fixed or float
git-svn-id: http://skia.googlecode.com/svn/trunk@780 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/MatrixTest.cpp')
-rw-r--r--tests/MatrixTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 052687da34..49a98c2c2c 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -5,7 +5,7 @@ static bool nearly_equal_scalar(SkScalar a, SkScalar b) {
#ifdef SK_SCALAR_IS_FLOAT
const float tolerance = 0.000005f;
#else
- const int32_t tolerance = 3;
+ const int32_t tolerance = 8;
#endif
return SkScalarAbs(a - b) <= tolerance;
@@ -14,7 +14,7 @@ static bool nearly_equal_scalar(SkScalar a, SkScalar b) {
static bool nearly_equal(const SkMatrix& a, const SkMatrix& b) {
for (int i = 0; i < 9; i++) {
if (!nearly_equal_scalar(a[i], b[i])) {
- printf("not equal %g %g\n", a[i], b[i]);
+ printf("not equal %g %g\n", (float)a[i], (float)b[i]);
return false;
}
}