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

Side by Side Diff: base/file_path_unittest.cc

Issue 12286020: Replace FilePath with base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « base/command_line_unittest.cc ('k') | base/file_util_unittest.cc » ('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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
11 11
12 // This macro helps avoid wrapped lines in the test structs. 12 // This macro helps avoid wrapped lines in the test structs.
13 #define FPL(x) FILE_PATH_LITERAL(x) 13 #define FPL(x) FILE_PATH_LITERAL(x)
14 14
15 // This macro constructs strings which can contain NULs. 15 // This macro constructs strings which can contain NULs.
16 #define FPS(x) FilePath::StringType(FPL(x), arraysize(FPL(x)) - 1) 16 #define FPS(x) FilePath::StringType(FPL(x), arraysize(FPL(x)) - 1)
17 17
18 namespace base {
19
18 struct UnaryTestData { 20 struct UnaryTestData {
19 const FilePath::CharType* input; 21 const FilePath::CharType* input;
20 const FilePath::CharType* expected; 22 const FilePath::CharType* expected;
21 }; 23 };
22 24
23 struct UnaryBooleanTestData { 25 struct UnaryBooleanTestData {
24 const FilePath::CharType* input; 26 const FilePath::CharType* input;
25 bool expected; 27 bool expected;
26 }; 28 };
27 29
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 }; 1191 };
1190 for (size_t i = 0; i < arraysize(cases); ++i) { 1192 for (size_t i = 0; i < arraysize(cases); ++i) {
1191 FilePath input(cases[i].input); 1193 FilePath input(cases[i].input);
1192 FilePath observed = input.NormalizePathSeparators(); 1194 FilePath observed = input.NormalizePathSeparators();
1193 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) << 1195 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
1194 "i: " << i << ", input: " << input.value(); 1196 "i: " << i << ", input: " << input.value();
1195 } 1197 }
1196 } 1198 }
1197 1199
1198 #endif 1200 #endif
1201
1202 } // namespace base
OLDNEW
« no previous file with comments | « base/command_line_unittest.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698