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 <stddef.h> |
| 6 |
5 #include <string> | 7 #include <string> |
6 | 8 |
7 #include "base/basictypes.h" | 9 #include "base/macros.h" |
8 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
9 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
11 #include "base/test/scoped_locale.h" | 13 #include "base/test/scoped_locale.h" |
| 14 #include "build/build_config.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
13 | 16 |
14 #ifdef WCHAR_T_IS_UTF32 | 17 #ifdef WCHAR_T_IS_UTF32 |
15 static const std::wstring kSysWideOldItalicLetterA = L"\x10300"; | 18 static const std::wstring kSysWideOldItalicLetterA = L"\x10300"; |
16 #else | 19 #else |
17 static const std::wstring kSysWideOldItalicLetterA = L"\xd800\xdf00"; | 20 static const std::wstring kSysWideOldItalicLetterA = L"\xd800\xdf00"; |
18 #endif | 21 #endif |
19 | 22 |
20 namespace base { | 23 namespace base { |
21 | 24 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { | 187 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { |
185 std::wstring wide = kConvertRoundtripCases[i]; | 188 std::wstring wide = kConvertRoundtripCases[i]; |
186 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide)); | 189 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide)); |
187 EXPECT_EQ(wide.size(), trip.size()); | 190 EXPECT_EQ(wide.size(), trip.size()); |
188 EXPECT_EQ(wide, trip); | 191 EXPECT_EQ(wide, trip); |
189 } | 192 } |
190 } | 193 } |
191 #endif // OS_LINUX | 194 #endif // OS_LINUX |
192 | 195 |
193 } // namespace base | 196 } // namespace base |
OLD | NEW |