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

Unified Diff: ui/gfx/geometry/size_unittest.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 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 | « ui/gfx/geometry/size_f.h ('k') | ui/gfx/image/image_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/size_unittest.cc
diff --git a/ui/gfx/geometry/size_unittest.cc b/ui/gfx/geometry/size_unittest.cc
index 87a487c7a6634c04551594a6df59dd020bef15f4..085fbfb29fd1e225207f9440ece62dc5a4270054 100644
--- a/ui/gfx/geometry/size_unittest.cc
+++ b/ui/gfx/geometry/size_unittest.cc
@@ -18,15 +18,14 @@ int TestSizeF(const SizeF& s) {
} // namespace
TEST(SizeTest, ToSizeF) {
- // Check that implicit conversion from integer to float compiles.
+ // Check that explicit conversion from integer to float compiles.
Size a(10, 20);
- float width = TestSizeF(a);
+ float width = TestSizeF(gfx::SizeF(a));
EXPECT_EQ(width, a.width());
SizeF b(10, 20);
- EXPECT_EQ(a, b);
- EXPECT_EQ(b, a);
+ EXPECT_EQ(b, gfx::SizeF(a));
}
TEST(SizeTest, ToFlooredSize) {
« no previous file with comments | « ui/gfx/geometry/size_f.h ('k') | ui/gfx/image/image_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698