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