diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 17:26:55 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 17:26:55 +0000 |
commit | c3efd145173a993f8293604c6ba00d5727aa4caf (patch) | |
tree | 3560ee0c1685fdc4394264acdbe484a17e2db7f5 /ui/gfx/point_unittest.cc | |
parent | 02e5812aea24d04b44f2f3c40bb9ea906be8613c (diff) | |
download | chromium_src-c3efd145173a993f8293604c6ba00d5727aa4caf.zip chromium_src-c3efd145173a993f8293604c6ba00d5727aa4caf.tar.gz chromium_src-c3efd145173a993f8293604c6ba00d5727aa4caf.tar.bz2 |
ui: Build fix for gcc 4.6.3, default version of ubuntu 12.04.
EXPECT_EQ(true, ...) or EXPECT_EQ(false, ...) cause errors like:
$ converting 'true' to pointer type for argument 1 of '...'.
Switch us to use EXPECT_TRUE/EXPECT_FALSE where appropriate.
This came from https://codereview.chromium.org/11141010/ (r161762).
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/11139009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/point_unittest.cc')
-rw-r--r-- | ui/gfx/point_unittest.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/gfx/point_unittest.cc b/ui/gfx/point_unittest.cc index 028c10a..cae2166 100644 --- a/ui/gfx/point_unittest.cc +++ b/ui/gfx/point_unittest.cc @@ -10,22 +10,23 @@ namespace ui { -static int test_pointf(const gfx::PointF& p) { +namespace { + +int TestPointF(const gfx::PointF& p) { return p.x(); } +} // namespace + TEST(PointTest, ToPointF) { // Check that implicit conversion from integer to float compiles. gfx::Point a(10, 20); - float x = test_pointf(a); + float x = TestPointF(a); EXPECT_EQ(x, a.x()); gfx::PointF b(10, 20); - bool equals = a == b; - EXPECT_EQ(true, equals); - - equals = b == a; - EXPECT_EQ(true, equals); + EXPECT_EQ(a, b); + EXPECT_EQ(b, a); } TEST(PointTest, IsOrigin) { |