Index: ui/compositor/test/test_utils.cc |
diff --git a/ui/compositor/test/test_utils.cc b/ui/compositor/test/test_utils.cc |
index dc70b79159b556c5f341a6f2bfb2d3f192cd2ac8..557f5f6e50386bdb15937d0383de7b2b91697b3d 100644 |
--- a/ui/compositor/test/test_utils.cc |
+++ b/ui/compositor/test/test_utils.cc |
@@ -10,13 +10,22 @@ |
namespace ui { |
+//TODO(avallee): Make this into a predicate and add some matrix pretty printing. |
void CheckApproximatelyEqual(const gfx::Transform& lhs, |
const gfx::Transform& rhs) { |
for (int i = 0; i < 4; ++i) { |
for (int j = 0; j < 4; ++j) { |
- EXPECT_FLOAT_EQ(lhs.matrix().get(i, j), rhs.matrix().get(i, j)); |
+ EXPECT_FLOAT_EQ(lhs.matrix().get(i, j), rhs.matrix().get(i, j)) |
+ << "(i, j) = (" << i << ", " << j <<")"; |
} |
} |
+ |
+ if (::testing::Test::HasFailure()) { |
danakj
2013/08/29 21:22:34
I'm not sure about this, if another test had a fai
avallee
2013/08/30 00:01:46
Yeah, I'm not sure about this either. What I actua
danakj
2013/08/30 00:04:09
Oh I see. I guess that's why I used side effects i
avallee
2013/09/04 15:04:41
Done.
|
+ ADD_FAILURE() << "Expected matrix:\n" |
+ << lhs.ToString() << "\n" |
+ << "Actual matrix:\n" |
+ << rhs.ToString(); |
+ } |
} |
void CheckApproximatelyEqual(const gfx::Rect& lhs, const gfx::Rect& rhs) { |