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

Unified Diff: ui/gfx/insets_unittest.cc

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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/gfx/insets_unittest.cc
diff --git a/ui/gfx/insets_unittest.cc b/ui/gfx/insets_unittest.cc
deleted file mode 100644
index 563f20fca234b4efd07c33cd917684465b0c784c..0000000000000000000000000000000000000000
--- a/ui/gfx/insets_unittest.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gfx/insets.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-TEST(InsetsTest, InsetsDefault) {
- gfx::Insets insets;
- EXPECT_EQ(0, insets.top());
- EXPECT_EQ(0, insets.left());
- EXPECT_EQ(0, insets.bottom());
- EXPECT_EQ(0, insets.right());
- EXPECT_EQ(0, insets.width());
- EXPECT_EQ(0, insets.height());
- EXPECT_TRUE(insets.empty());
-}
-
-TEST(InsetsTest, Insets) {
- gfx::Insets insets(1, 2, 3, 4);
- EXPECT_EQ(1, insets.top());
- EXPECT_EQ(2, insets.left());
- EXPECT_EQ(3, insets.bottom());
- EXPECT_EQ(4, insets.right());
- EXPECT_EQ(6, insets.width()); // Left + right.
- EXPECT_EQ(4, insets.height()); // Top + bottom.
- EXPECT_FALSE(insets.empty());
-}
-
-TEST(InsetsTest, Set) {
- gfx::Insets insets;
- insets.Set(1, 2, 3, 4);
- EXPECT_EQ(1, insets.top());
- EXPECT_EQ(2, insets.left());
- EXPECT_EQ(3, insets.bottom());
- EXPECT_EQ(4, insets.right());
-}
-
-TEST(InsetsTest, Add) {
- gfx::Insets insets;
- insets.Set(1, 2, 3, 4);
- insets += gfx::Insets(5, 6, 7, 8);
- EXPECT_EQ(6, insets.top());
- EXPECT_EQ(8, insets.left());
- EXPECT_EQ(10, insets.bottom());
- EXPECT_EQ(12, insets.right());
-}
-
-TEST(InsetsTest, Equality) {
- gfx::Insets insets1;
- insets1.Set(1, 2, 3, 4);
- gfx::Insets insets2;
- // Test operator== and operator!=.
- EXPECT_FALSE(insets1 == insets2);
- EXPECT_TRUE(insets1 != insets2);
-
- insets2.Set(1, 2, 3, 4);
- EXPECT_TRUE(insets1 == insets2);
- EXPECT_FALSE(insets1 != insets2);
-}
-
-TEST(InsetsTest, ToString) {
- gfx::Insets insets(1, 2, 3, 4);
- EXPECT_EQ("1,2,3,4", insets.ToString());
-}
« ui/aura/aura.gyp ('K') | « ui/gfx/insets_f.cc ('k') | ui/gfx/matrix3_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698