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

Side by Side Diff: base/command_line_unittest.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « base/command_line.cc ('k') | base/compiler_specific.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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"
9 #include "base/command_line.h" 8 #include "base/command_line.h"
10 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "build/build_config.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace base { 16 namespace base {
16 17
17 // To test Windows quoting behavior, we use a string that has some backslashes 18 // To test Windows quoting behavior, we use a string that has some backslashes
18 // and quotes. 19 // and quotes.
19 // Consider the command-line argument: q\"bs1\bs2\\bs3q\\\" 20 // Consider the command-line argument: q\"bs1\bs2\\bs3q\\\"
20 // Here it is with C-style escapes. 21 // Here it is with C-style escapes.
21 static const CommandLine::StringType kTrickyQuoted = 22 static const CommandLine::StringType kTrickyQuoted =
22 FILE_PATH_LITERAL("q\\\"bs1\\bs2\\\\bs3q\\\\\\\""); 23 FILE_PATH_LITERAL("q\\\"bs1\\bs2\\\\bs3q\\\\\\\"");
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 CommandLine assigned = *initial; 398 CommandLine assigned = *initial;
398 CommandLine::SwitchMap switch_map = initial->GetSwitches(); 399 CommandLine::SwitchMap switch_map = initial->GetSwitches();
399 initial.reset(); 400 initial.reset();
400 for (const auto& pair : switch_map) 401 for (const auto& pair : switch_map)
401 EXPECT_TRUE(copy_constructed.HasSwitch(pair.first)); 402 EXPECT_TRUE(copy_constructed.HasSwitch(pair.first));
402 for (const auto& pair : switch_map) 403 for (const auto& pair : switch_map)
403 EXPECT_TRUE(assigned.HasSwitch(pair.first)); 404 EXPECT_TRUE(assigned.HasSwitch(pair.first));
404 } 405 }
405 406
406 } // namespace base 407 } // namespace base
OLDNEW
« no previous file with comments | « base/command_line.cc ('k') | base/compiler_specific.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698