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

Side by Side Diff: ui/gfx/range/range_win_unittest.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (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/platform_font_win_unittest.cc ('k') | ui/gfx/screen_win_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/range/range.h" 6 #include "ui/gfx/range/range.h"
7 7
8 TEST(RangeTest, FromCHARRANGE) { 8 TEST(RangeTest, FromCHARRANGE) {
9 CHARRANGE cr = { 10, 32 }; 9 CHARRANGE cr = { 10, 32 };
10 gfx::Range r(cr, 50); 10 gfx::Range r(cr, 50);
(...skipping 27 matching lines...) Expand all
38 TEST(RangeTest, ToCHARRANGE) { 38 TEST(RangeTest, ToCHARRANGE) {
39 gfx::Range r(10, 30); 39 gfx::Range r(10, 30);
40 CHARRANGE cr = r.ToCHARRANGE(); 40 CHARRANGE cr = r.ToCHARRANGE();
41 EXPECT_EQ(10, cr.cpMin); 41 EXPECT_EQ(10, cr.cpMin);
42 EXPECT_EQ(30, cr.cpMax); 42 EXPECT_EQ(30, cr.cpMax);
43 } 43 }
44 44
45 TEST(RangeTest, ReversedToCHARRANGE) { 45 TEST(RangeTest, ReversedToCHARRANGE) {
46 gfx::Range r(20, 10); 46 gfx::Range r(20, 10);
47 CHARRANGE cr = r.ToCHARRANGE(); 47 CHARRANGE cr = r.ToCHARRANGE();
48 EXPECT_EQ(20U, cr.cpMin); 48 EXPECT_EQ(20, cr.cpMin);
49 EXPECT_EQ(10U, cr.cpMax); 49 EXPECT_EQ(10, cr.cpMax);
50 } 50 }
51 51
52 TEST(RangeTest, FromCHARRANGEInvalid) { 52 TEST(RangeTest, FromCHARRANGEInvalid) {
53 CHARRANGE cr = { -1, -1 }; 53 CHARRANGE cr = { -1, -1 };
54 gfx::Range r(cr, 30); 54 gfx::Range r(cr, 30);
55 EXPECT_FALSE(r.IsValid()); 55 EXPECT_FALSE(r.IsValid());
56 } 56 }
57 57
58 TEST(RangeTest, ToCHARRANGEInvalid) { 58 TEST(RangeTest, ToCHARRANGEInvalid) {
59 gfx::Range r(gfx::Range::InvalidRange()); 59 gfx::Range r(gfx::Range::InvalidRange());
60 CHARRANGE cr = r.ToCHARRANGE(); 60 CHARRANGE cr = r.ToCHARRANGE();
61 EXPECT_EQ(-1, cr.cpMin); 61 EXPECT_EQ(-1, cr.cpMin);
62 EXPECT_EQ(-1, cr.cpMax); 62 EXPECT_EQ(-1, cr.cpMax);
63 } 63 }
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_win_unittest.cc ('k') | ui/gfx/screen_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698