OLD | NEW |
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/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "testing/platform_test.h" | 9 #include "testing/platform_test.h" |
10 | 10 |
11 // This macro helps avoid wrapped lines in the test structs. | 11 // This macro helps avoid wrapped lines in the test structs. |
12 #define FPL(x) FILE_PATH_LITERAL(x) | 12 #define FPL(x) FILE_PATH_LITERAL(x) |
13 | 13 |
14 // This macro constructs strings which can contain NULs. | 14 // This macro constructs strings which can contain NULs. |
15 #define FPS(x) FilePath::StringType(FPL(x), arraysize(FPL(x)) - 1) | 15 #define FPS(x) FilePath::StringType(FPL(x), arraysize(FPL(x)) - 1) |
16 | 16 |
17 namespace base { | 17 namespace base { |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 { FPL("foo/"), FPL("foo/") } | 1222 { FPL("foo/"), FPL("foo/") } |
1223 }; | 1223 }; |
1224 for (size_t i = 0; i < arraysize(cases); ++i) { | 1224 for (size_t i = 0; i < arraysize(cases); ++i) { |
1225 FilePath input = FilePath(cases[i].input).NormalizePathSeparators(); | 1225 FilePath input = FilePath(cases[i].input).NormalizePathSeparators(); |
1226 FilePath expected = FilePath(cases[i].expected).NormalizePathSeparators(); | 1226 FilePath expected = FilePath(cases[i].expected).NormalizePathSeparators(); |
1227 EXPECT_EQ(expected.value(), input.AsEndingWithSeparator().value()); | 1227 EXPECT_EQ(expected.value(), input.AsEndingWithSeparator().value()); |
1228 } | 1228 } |
1229 } | 1229 } |
1230 | 1230 |
1231 } // namespace base | 1231 } // namespace base |
OLD | NEW |