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

Unified Diff: ui/gfx/transform_util_unittest.cc

Issue 1071803003: Update matrix distance metric to account for snapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grammar Created 5 years, 8 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
« no previous file with comments | « ui/gfx/transform_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform_util_unittest.cc
diff --git a/ui/gfx/transform_util_unittest.cc b/ui/gfx/transform_util_unittest.cc
index 893a062c9e1ed2da840fd3a8485eb574248c8769..404833c93144360a11829d09d7f4728a4abe09c1 100644
--- a/ui/gfx/transform_util_unittest.cc
+++ b/ui/gfx/transform_util_unittest.cc
@@ -192,19 +192,5 @@ TEST(TransformUtilTest, TransformAboutPivot) {
EXPECT_EQ(Point(-11, -20).ToString(), point.ToString());
}
-TEST(TransformUtilTest, MatrixDistance) {
- Transform a;
- Transform b(0, 1, 1, 1,
- 1, 0, 1, 1,
- 1, 1, 0, 1,
- 1, 1, 1, 0);
- // Each entry in |a| should be 1 away from the corresponding entry in |b|.
- // This means the matrix distance should be sqrt(num_entries) = 4.
- EXPECT_EQ(4, MatrixDistance(a, b));
-
- Transform c = b;
- EXPECT_EQ(0, MatrixDistance(b, c));
-}
-
} // namespace
} // namespace gfx
« no previous file with comments | « ui/gfx/transform_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698