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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_piece.h" | 8 #include "base/strings/string_piece.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "base/test/scoped_locale.h" | 10 #include "base/test/scoped_locale.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 #ifdef WCHAR_T_IS_UTF32 | 14 #ifdef WCHAR_T_IS_UTF32 |
15 static const std::wstring kSysWideOldItalicLetterA = L"\x10300"; | 15 static const std::wstring kSysWideOldItalicLetterA = L"\x10300"; |
16 #else | 16 #else |
17 static const std::wstring kSysWideOldItalicLetterA = L"\xd800\xdf00"; | 17 static const std::wstring kSysWideOldItalicLetterA = L"\xd800\xdf00"; |
18 #endif | 18 #endif |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { | 178 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { |
179 std::wstring wide = kConvertRoundtripCases[i]; | 179 std::wstring wide = kConvertRoundtripCases[i]; |
180 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide)); | 180 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide)); |
181 EXPECT_EQ(wide.size(), trip.size()); | 181 EXPECT_EQ(wide.size(), trip.size()); |
182 EXPECT_EQ(wide, trip); | 182 EXPECT_EQ(wide, trip); |
183 } | 183 } |
184 } | 184 } |
185 #endif // OS_LINUX | 185 #endif // OS_LINUX |
186 | 186 |
187 } // namespace base | 187 } // namespace base |
OLD | NEW |