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

Side by Side Diff: ui/gfx/geometry/scroll_offset_unittest.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/geometry/rect_unittest.cc ('k') | ui/gfx/geometry/size.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h>
6
5 #include <cmath> 7 #include <cmath>
6 #include <limits> 8 #include <limits>
7 9
8 #include "base/basictypes.h" 10 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/geometry/scroll_offset.h" 12 #include "ui/gfx/geometry/scroll_offset.h"
11 13
12 namespace gfx { 14 namespace gfx {
13 15
14 TEST(ScrollOffsetTest, IsZero) { 16 TEST(ScrollOffsetTest, IsZero) {
15 ScrollOffset zero(0, 0); 17 ScrollOffset zero(0, 0);
16 ScrollOffset nonzero(0.1, -0.1); 18 ScrollOffset nonzero(0.1, -0.1);
17 19
18 EXPECT_TRUE(zero.IsZero()); 20 EXPECT_TRUE(zero.IsZero());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 EXPECT_EQ(ScrollOffset(8.5, 10.5).ToString(), a.ToString()); 115 EXPECT_EQ(ScrollOffset(8.5, 10.5).ToString(), a.ToString());
114 a.SetToMin(ScrollOffset(11.5, 9.5)); 116 a.SetToMin(ScrollOffset(11.5, 9.5));
115 EXPECT_EQ(ScrollOffset(8.5, 9.5).ToString(), a.ToString()); 117 EXPECT_EQ(ScrollOffset(8.5, 9.5).ToString(), a.ToString());
116 a.SetToMin(ScrollOffset(7.5, 11.5)); 118 a.SetToMin(ScrollOffset(7.5, 11.5));
117 EXPECT_EQ(ScrollOffset(7.5, 9.5).ToString(), a.ToString()); 119 EXPECT_EQ(ScrollOffset(7.5, 9.5).ToString(), a.ToString());
118 a.SetToMin(ScrollOffset(3.5, 5.5)); 120 a.SetToMin(ScrollOffset(3.5, 5.5));
119 EXPECT_EQ(ScrollOffset(3.5, 5.5).ToString(), a.ToString()); 121 EXPECT_EQ(ScrollOffset(3.5, 5.5).ToString(), a.ToString());
120 } 122 }
121 123
122 } // namespace gfx 124 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/rect_unittest.cc ('k') | ui/gfx/geometry/size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698