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

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

Issue 662273002: gfx:: De-templatize Size and SizeF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inlines-size: . Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/geometry/size_f.cc ('k') | ui/gfx/gfx.gyp » ('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 (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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "ui/gfx/geometry/size.h" 6 #include "ui/gfx/geometry/size.h"
7 #include "ui/gfx/geometry/size_base.h"
8 #include "ui/gfx/geometry/size_conversions.h" 7 #include "ui/gfx/geometry/size_conversions.h"
9 #include "ui/gfx/geometry/size_f.h" 8 #include "ui/gfx/geometry/size_f.h"
10 9
11 namespace gfx { 10 namespace gfx {
12 11
13 namespace { 12 namespace {
14 13
15 int TestSizeF(const SizeF& s) { 14 int TestSizeF(const SizeF& s) {
16 return s.width(); 15 return s.width();
17 } 16 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString()); 117 EXPECT_EQ(SizeF(8.5f, 10.5f).ToString(), a.ToString());
119 a.SetToMin(SizeF(11.5f, 9.5f)); 118 a.SetToMin(SizeF(11.5f, 9.5f));
120 EXPECT_EQ(SizeF(8.5f, 9.5f).ToString(), a.ToString()); 119 EXPECT_EQ(SizeF(8.5f, 9.5f).ToString(), a.ToString());
121 a.SetToMin(SizeF(7.5f, 11.5f)); 120 a.SetToMin(SizeF(7.5f, 11.5f));
122 EXPECT_EQ(SizeF(7.5f, 9.5f).ToString(), a.ToString()); 121 EXPECT_EQ(SizeF(7.5f, 9.5f).ToString(), a.ToString());
123 a.SetToMin(SizeF(3.5f, 5.5f)); 122 a.SetToMin(SizeF(3.5f, 5.5f));
124 EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString()); 123 EXPECT_EQ(SizeF(3.5f, 5.5f).ToString(), a.ToString());
125 } 124 }
126 125
127 } // namespace gfx 126 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/size_f.cc ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698