Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: base/strings/sys_string_conversions_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/strings/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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/test/scoped_locale.h" 11 #include "base/test/scoped_locale.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/googletest/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
19 19
20 namespace base { 20 namespace base {
21 21
22 TEST(SysStrings, SysWideToUTF8) { 22 TEST(SysStrings, SysWideToUTF8) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { 184 for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) {
185 std::wstring wide = kConvertRoundtripCases[i]; 185 std::wstring wide = kConvertRoundtripCases[i];
186 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide)); 186 std::wstring trip = UTF8ToWide(SysWideToNativeMB(wide));
187 EXPECT_EQ(wide.size(), trip.size()); 187 EXPECT_EQ(wide.size(), trip.size());
188 EXPECT_EQ(wide, trip); 188 EXPECT_EQ(wide, trip);
189 } 189 }
190 } 190 }
191 #endif // OS_LINUX 191 #endif // OS_LINUX
192 192
193 } // namespace base 193 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/sys_string_conversions_mac_unittest.mm ('k') | base/strings/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698