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

Unified Diff: base/command_line_unittest.cc

Issue 7866036: micro optimize CommandLine.GetSwitchPrefixLength (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ' Created 9 years, 3 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
« no previous file with comments | « 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 80874ac5a02d8bb4f44265d8ca45273c4369cbd4..656236e09e35c6a2bb705c4bb2ba14e2beea1798 100644
--- a/base/command_line_unittest.cc
+++ b/base/command_line_unittest.cc
@@ -34,6 +34,7 @@ TEST(CommandLineTest, CommandLineConstructor) {
FILE_PATH_LITERAL("-spaetzle=Crepe"),
FILE_PATH_LITERAL("-=loosevalue"),
FILE_PATH_LITERAL("FLAN"),
+ FILE_PATH_LITERAL("a"),
FILE_PATH_LITERAL("--input-translation=45--output-rotation"),
FILE_PATH_LITERAL("--"),
FILE_PATH_LITERAL("--"),
@@ -74,13 +75,15 @@ TEST(CommandLineTest, CommandLineConstructor) {
EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation"));
const CommandLine::StringVector& args = cl.GetArgs();
- ASSERT_EQ(6U, args.size());
+ ASSERT_EQ(7U, args.size());
std::vector<CommandLine::StringType>::const_iterator iter = args.begin();
EXPECT_EQ(FILE_PATH_LITERAL("flim"), *iter);
++iter;
EXPECT_EQ(FILE_PATH_LITERAL("FLAN"), *iter);
++iter;
+ EXPECT_EQ(FILE_PATH_LITERAL("a"), *iter);
+ ++iter;
EXPECT_EQ(FILE_PATH_LITERAL("--"), *iter);
++iter;
EXPECT_EQ(FILE_PATH_LITERAL("--not-a-switch"), *iter);
« no previous file with comments | « base/command_line.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698