diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 22:39:33 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-26 22:39:33 +0000 |
commit | 51343d5ae5d463fc4f84f4af79b44962a580cd4f (patch) | |
tree | 8d53ff6a0097950f2732ee5376bf0c83297c9c87 /base/command_line_unittest.cc | |
parent | 7b9db43fbc1731cabc985f6e026a07a2ceaafc28 (diff) | |
download | chromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.zip chromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.tar.gz chromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.tar.bz2 |
Remove deprecated CommandLine(std::wstring) ctor.
Add a ctor for creating a CommandLine for carrying arguments;
convert all the users to either that or the FilePath version.
BUG=24672
Review URL: http://codereview.chromium.org/329017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line_unittest.cc')
-rw-r--r-- | base/command_line_unittest.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/base/command_line_unittest.cc b/base/command_line_unittest.cc index bfd0a56..7ab8f79 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); |