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

Unified Diff: cc/base/float_quad_unittest.cc

Issue 23043011: cc: Use SkMScalar instead of doubles everywhere in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: danakj review 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
« no previous file with comments | « cc/animation/transform_operations_unittest.cc ('k') | cc/base/math_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/float_quad_unittest.cc
diff --git a/cc/base/float_quad_unittest.cc b/cc/base/float_quad_unittest.cc
index bb3446c0d69c11fd6f559f7b311926bedfa4c877..186624eec34c42ea073427c68cb2f5147f02908c 100644
--- a/cc/base/float_quad_unittest.cc
+++ b/cc/base/float_quad_unittest.cc
@@ -25,15 +25,15 @@ TEST(FloatQuadTest, IsRectilinearTest) {
rectilinear_trans[7].Scale(100000, 100000);
rectilinear_trans[7].Rotate(180.0);
+ gfx::QuadF original(
+ gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f));
+
for (int i = 0; i < kNumRectilinear; ++i) {
bool clipped = false;
- gfx::QuadF quad = MathUtil::MapQuad(
- rectilinear_trans[i],
- gfx::QuadF(
- gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)),
- &clipped);
- ASSERT_TRUE(!clipped);
- EXPECT_TRUE(quad.IsRectilinear());
+ gfx::QuadF quad =
+ MathUtil::MapQuad(rectilinear_trans[i], original, &clipped);
+ ASSERT_TRUE(!clipped) << "case " << i;
+ EXPECT_TRUE(quad.IsRectilinear()) << "case " << i;
}
const int kNumNonRectilinear = 10;
@@ -51,13 +51,10 @@ TEST(FloatQuadTest, IsRectilinearTest) {
for (int i = 0; i < kNumNonRectilinear; ++i) {
bool clipped = false;
- gfx::QuadF quad = MathUtil::MapQuad(
- non_rectilinear_trans[i],
- gfx::QuadF(
- gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)),
- &clipped);
- ASSERT_TRUE(!clipped);
- EXPECT_FALSE(quad.IsRectilinear());
+ gfx::QuadF quad =
+ MathUtil::MapQuad(non_rectilinear_trans[i], original, &clipped);
+ ASSERT_TRUE(!clipped) << "case " << i;
+ EXPECT_FALSE(quad.IsRectilinear()) << "case " << i;
}
}
« no previous file with comments | « cc/animation/transform_operations_unittest.cc ('k') | cc/base/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698