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

Unified Diff: base/gfx/rect_unittest.cc

Issue 93131: Change Size::IsEmpty() to be consistent with Rect::IsEmpty() (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « base/gfx/rect.cc ('k') | base/gfx/size.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/gfx/rect_unittest.cc
===================================================================
--- base/gfx/rect_unittest.cc (revision 14559)
+++ base/gfx/rect_unittest.cc (working copy)
@@ -267,3 +267,14 @@
gfx::Rect(5, 5, 20, 30)).Equals(
gfx::Rect(25, 10, 5, 20)));
}
+
+TEST(RectTest, IsEmpty) {
+ EXPECT_TRUE(gfx::Rect(0, 0, 0, 0).IsEmpty());
+ EXPECT_TRUE(gfx::Rect(0, 0, 0, 0).size().IsEmpty());
+ EXPECT_TRUE(gfx::Rect(0, 0, 10, 0).IsEmpty());
+ EXPECT_TRUE(gfx::Rect(0, 0, 10, 0).size().IsEmpty());
+ EXPECT_TRUE(gfx::Rect(0, 0, 0, 10).IsEmpty());
+ EXPECT_TRUE(gfx::Rect(0, 0, 0, 10).size().IsEmpty());
+ EXPECT_FALSE(gfx::Rect(0, 0, 10, 10).IsEmpty());
+ EXPECT_FALSE(gfx::Rect(0, 0, 10, 10).size().IsEmpty());
+}
« no previous file with comments | « base/gfx/rect.cc ('k') | base/gfx/size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698