Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: ui/compositor/test/test_utils.cc

Issue 22861008: Add support for inverse transform animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the DCHECK production code and removed k prefix to const transform variable. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3e178b61cd0740c65978738a9bddafa52fcdd4fc 100644
--- a/ui/compositor/test/test_utils.cc
+++ b/ui/compositor/test/test_utils.cc
@@ -10,13 +10,23 @@
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) {
+ unsigned int errors = 0;
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 <<"), error count: " << ++errors;
danakj 2013/09/04 15:29:09 nit: spaces around <<
avallee 2013/09/04 15:36:53 Done.
}
}
+
+ if (errors) {
+ ADD_FAILURE() << "Expected matrix:\n"
+ << lhs.ToString() << "\n"
+ << "Actual matrix:\n"
+ << rhs.ToString();
+ }
}
void CheckApproximatelyEqual(const gfx::Rect& lhs, const gfx::Rect& rhs) {

Powered by Google App Engine
This is Rietveld 408576698