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

Side by Side Diff: content/browser/gpu/gpu_control_list_string_info_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/gpu/gpu_control_list.h" 5 #include "content/browser/gpu/gpu_control_list.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace content { 8 namespace content {
9 9
10 class StringInfoTest : public testing::Test { 10 class StringInfoTest : public testing::Test {
11 public: 11 public:
12 StringInfoTest() { } 12 StringInfoTest() { }
13 virtual ~StringInfoTest() { } 13 virtual ~StringInfoTest() { }
14 14
15 typedef GpuControlList::StringInfo StringInfo; 15 typedef GpuControlList::StringInfo StringInfo;
16 }; 16 };
17 17
18 TEST_F(StringInfoTest, ValidStringInfo) { 18 TEST_F(StringInfoTest, ValidStringInfo) {
19 const std::string op[] = { 19 const std::string op[] = {
20 "contains", 20 "contains",
21 "beginwith", 21 "beginwith",
22 "endwith", 22 "endwith",
23 "=" 23 "="
24 }; 24 };
25 for (size_t i = 0; i < arraysize(op); ++i) { 25 for (size_t i = 0; i < arraysize(op); ++i) {
26 { 26 {
27 StringInfo info(op[i], ""); 27 StringInfo info(op[i], std::string());
28 EXPECT_TRUE(info.IsValid()); 28 EXPECT_TRUE(info.IsValid());
29 } 29 }
30 { 30 {
31 StringInfo info(op[i], "hello"); 31 StringInfo info(op[i], "hello");
32 EXPECT_TRUE(info.IsValid()); 32 EXPECT_TRUE(info.IsValid());
33 } 33 }
34 } 34 }
35 } 35 }
36 36
37 TEST_F(StringInfoTest, InvalidStringInfo) { 37 TEST_F(StringInfoTest, InvalidStringInfo) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 EXPECT_TRUE(info.Contains("HAPPY")); 89 EXPECT_TRUE(info.Contains("HAPPY"));
90 EXPECT_FALSE(info.Contains("ha-ppy")); 90 EXPECT_FALSE(info.Contains("ha-ppy"));
91 EXPECT_FALSE(info.Contains("ha ppy")); 91 EXPECT_FALSE(info.Contains("ha ppy"));
92 EXPECT_FALSE(info.Contains(" happy")); 92 EXPECT_FALSE(info.Contains(" happy"));
93 EXPECT_FALSE(info.Contains("happy ")); 93 EXPECT_FALSE(info.Contains("happy "));
94 } 94 }
95 } 95 }
96 96
97 } // namespace content 97 } // namespace content
98 98
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698