OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 CommandLine::StringType program_string(cl_program_path.GetProgram().value()); | 284 CommandLine::StringType program_string(cl_program_path.GetProgram().value()); |
285 EXPECT_EQ('"', cmd_string[0]); | 285 EXPECT_EQ('"', cmd_string[0]); |
286 EXPECT_EQ(program_string, cmd_string.substr(1, program_string.length())); | 286 EXPECT_EQ(program_string, cmd_string.substr(1, program_string.length())); |
287 EXPECT_EQ('"', cmd_string[program_string.length() + 1]); | 287 EXPECT_EQ('"', cmd_string[program_string.length() + 1]); |
288 } | 288 } |
289 #endif | 289 #endif |
290 | 290 |
291 // Calling Init multiple times should not modify the previous CommandLine. | 291 // Calling Init multiple times should not modify the previous CommandLine. |
292 TEST(CommandLineTest, Init) { | 292 TEST(CommandLineTest, Init) { |
293 CommandLine* initial = CommandLine::ForCurrentProcess(); | 293 CommandLine* initial = CommandLine::ForCurrentProcess(); |
294 CommandLine::Init(0, NULL); | 294 EXPECT_FALSE(CommandLine::Init(0, NULL)); |
295 CommandLine* current = CommandLine::ForCurrentProcess(); | 295 CommandLine* current = CommandLine::ForCurrentProcess(); |
296 EXPECT_EQ(initial, current); | 296 EXPECT_EQ(initial, current); |
297 } | 297 } |
OLD | NEW |