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

Unified Diff: base/command_line_unittest.cc

Issue 1046363002: Enforce lowercase switches when calling CommandLine::HasSwitch(const char*). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove EXPECT_DEBUG_DEATH Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« base/command_line.cc ('K') | « base/command_line.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line_unittest.cc
diff --git a/base/command_line_unittest.cc b/base/command_line_unittest.cc
index e395c85677ab3f36844e9572b535e8f4d77adc90..66b1ed37c11636396ab328dacd429d4e1d1b3fd7 100644
--- a/base/command_line_unittest.cc
+++ b/base/command_line_unittest.cc
@@ -60,11 +60,11 @@ TEST(CommandLineTest, CommandLineConstructor) {
cl.GetProgram().value());
EXPECT_TRUE(cl.HasSwitch("foo"));
- EXPECT_TRUE(cl.HasSwitch("bAr"));
+ EXPECT_TRUE(cl.HasSwitch(std::string("bAr")));
tapted 2015/04/02 01:46:15 needs a comment
jackhou1 2015/04/02 04:51:51 Done.
EXPECT_TRUE(cl.HasSwitch("baz"));
EXPECT_TRUE(cl.HasSwitch("spaetzle"));
#if defined(OS_WIN)
- EXPECT_TRUE(cl.HasSwitch("SPAETZLE"));
+ EXPECT_TRUE(cl.HasSwitch(std::string("SPAETZLE")));
#endif
EXPECT_TRUE(cl.HasSwitch("other-switches"));
EXPECT_TRUE(cl.HasSwitch("input-translation"));
@@ -128,7 +128,7 @@ TEST(CommandLineTest, CommandLineFromString) {
EXPECT_TRUE(cl.HasSwitch("bar"));
EXPECT_TRUE(cl.HasSwitch("baz"));
EXPECT_TRUE(cl.HasSwitch("spaetzle"));
- EXPECT_TRUE(cl.HasSwitch("SPAETZLE"));
+ EXPECT_TRUE(cl.HasSwitch(std::string("SPAETZLE")));
EXPECT_TRUE(cl.HasSwitch("other-switches"));
EXPECT_TRUE(cl.HasSwitch("input-translation"));
EXPECT_TRUE(cl.HasSwitch("quotes"));
« base/command_line.cc ('K') | « base/command_line.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698