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

Unified Diff: base/command_line_unittest.cc

Issue 329017: Remove deprecated CommandLine(std::wstring) ctor. (Closed)
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/command_line.cc ('k') | base/process_util_unittest.cc » ('j') | 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 bfd0a5650b16c4b29f51680a08213683c5c0772d..7ab8f79e5a25045f43878b9e65d538819df4db55 100644
--- a/base/command_line_unittest.cc
+++ b/base/command_line_unittest.cc
@@ -12,8 +12,8 @@
TEST(CommandLineTest, CommandLineConstructor) {
#if defined(OS_WIN)
- CommandLine cl(L"");
- cl.ParseFromString(L"program --foo= -bAr /Spaetzel=pierogi /Baz flim "
+ CommandLine cl = CommandLine::FromString(
+ L"program --foo= -bAr /Spaetzel=pierogi /Baz flim "
L"--other-switches=\"--dog=canine --cat=feline\" "
L"-spaetzle=Crepe -=loosevalue flan "
L"--input-translation=\"45\"--output-rotation "
@@ -85,7 +85,7 @@ TEST(CommandLineTest, CommandLineConstructor) {
// Tests behavior with an empty input string.
TEST(CommandLineTest, EmptyString) {
#if defined(OS_WIN)
- CommandLine cl(L"");
+ CommandLine cl = CommandLine::FromString(L"");
EXPECT_TRUE(cl.command_line_string().empty());
EXPECT_TRUE(cl.program().empty());
#elif defined(OS_POSIX)
@@ -105,13 +105,7 @@ TEST(CommandLineTest, AppendSwitches) {
std::string switch4 = "switch4";
std::wstring value4 = L"\"a value with quotes\"";
-#if defined(OS_WIN)
- CommandLine cl(L"Program");
-#elif defined(OS_POSIX)
- std::vector<std::string> argv;
- argv.push_back(std::string("Program"));
- CommandLine cl(argv);
-#endif
+ CommandLine cl(FilePath(FILE_PATH_LITERAL("Program")));
cl.AppendSwitch(switch1);
cl.AppendSwitchWithValue(switch2, value);
« no previous file with comments | « base/command_line.cc ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698