OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/size_base.h" | 5 #include "ui/gfx/size_base.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
Peter Kasting
2012/10/30 01:14:14
Nit: Surprised this is necessary
danakj
2012/10/30 19:21:21
Oh, this was for the macro to give the size of an
| |
7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "ui/gfx/size.h" | 9 #include "ui/gfx/size.h" |
9 #include "ui/gfx/size_conversions.h" | 10 #include "ui/gfx/size_conversions.h" |
10 #include "ui/gfx/size_f.h" | 11 #include "ui/gfx/size_f.h" |
11 | 12 |
12 namespace ui { | 13 namespace ui { |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 int TestSizeF(const gfx::SizeF& s) { | 17 int TestSizeF(const gfx::SizeF& s) { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 gfx::ToRoundedSize(gfx::SizeF(-10.0001f, -10.0001f))); | 131 gfx::ToRoundedSize(gfx::SizeF(-10.0001f, -10.0001f))); |
131 EXPECT_EQ(gfx::Size(-10, -10), | 132 EXPECT_EQ(gfx::Size(-10, -10), |
132 gfx::ToRoundedSize(gfx::SizeF(-10.4999f, -10.4999f))); | 133 gfx::ToRoundedSize(gfx::SizeF(-10.4999f, -10.4999f))); |
133 EXPECT_EQ(gfx::Size(-11, -11), | 134 EXPECT_EQ(gfx::Size(-11, -11), |
134 gfx::ToRoundedSize(gfx::SizeF(-10.5f, -10.5f))); | 135 gfx::ToRoundedSize(gfx::SizeF(-10.5f, -10.5f))); |
135 EXPECT_EQ(gfx::Size(-11, -11), | 136 EXPECT_EQ(gfx::Size(-11, -11), |
136 gfx::ToRoundedSize(gfx::SizeF(-10.9999f, -10.9999f))); | 137 gfx::ToRoundedSize(gfx::SizeF(-10.9999f, -10.9999f))); |
137 } | 138 } |
138 | 139 |
139 } // namespace ui | 140 } // namespace ui |
OLD | NEW |