OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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/string_util.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/platform_test.h" | 9 #include "testing/platform_test.h" |
11 | 10 |
12 // This macro helps avoid wrapped lines in the test structs. | 11 // This macro helps avoid wrapped lines in the test structs. |
13 #define FPL(x) FILE_PATH_LITERAL(x) | 12 #define FPL(x) FILE_PATH_LITERAL(x) |
14 | 13 |
15 struct UnaryTestData { | 14 struct UnaryTestData { |
16 const FilePath::CharType* input; | 15 const FilePath::CharType* input; |
17 const FilePath::CharType* expected; | 16 const FilePath::CharType* expected; |
18 }; | 17 }; |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 { FPL("/\\foo\\/bar"), FPL("\\\\foo\\\\bar") }, | 1079 { FPL("/\\foo\\/bar"), FPL("\\\\foo\\\\bar") }, |
1081 }; | 1080 }; |
1082 for (size_t i = 0; i < arraysize(cases); ++i) { | 1081 for (size_t i = 0; i < arraysize(cases); ++i) { |
1083 FilePath input(cases[i].input); | 1082 FilePath input(cases[i].input); |
1084 FilePath observed = input.NormalizeWindowsPathSeparators(); | 1083 FilePath observed = input.NormalizeWindowsPathSeparators(); |
1085 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) << | 1084 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) << |
1086 "i: " << i << ", input: " << input.value(); | 1085 "i: " << i << ", input: " << input.value(); |
1087 } | 1086 } |
1088 } | 1087 } |
1089 #endif | 1088 #endif |
OLD | NEW |