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

Side by Side Diff: base/utf_string_conversions_unittest.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « base/utf_string_conversions.cc ('k') | chrome/app/breakpad_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/logging.h" 6 #include "base/logging.h"
7 #include "base/string_piece.h" 7 #include "base/string_piece.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 memcpy(WriteInto(&wmultistring, arraysize(wmulti)), wmulti, sizeof(wmulti)); 201 memcpy(WriteInto(&wmultistring, arraysize(wmulti)), wmulti, sizeof(wmulti));
202 EXPECT_EQ(arraysize(wmulti) - 1, wmultistring.length()); 202 EXPECT_EQ(arraysize(wmulti) - 1, wmultistring.length());
203 std::string expected; 203 std::string expected;
204 memcpy(WriteInto(&expected, arraysize(multi)), multi, sizeof(multi)); 204 memcpy(WriteInto(&expected, arraysize(multi)), multi, sizeof(multi));
205 EXPECT_EQ(arraysize(multi) - 1, expected.length()); 205 EXPECT_EQ(arraysize(multi) - 1, expected.length());
206 const std::string& converted = WideToUTF8(wmultistring); 206 const std::string& converted = WideToUTF8(wmultistring);
207 EXPECT_EQ(arraysize(multi) - 1, converted.length()); 207 EXPECT_EQ(arraysize(multi) - 1, converted.length());
208 EXPECT_EQ(expected, converted); 208 EXPECT_EQ(expected, converted);
209 } 209 }
210 210
211 } // base 211 } // namespace base
OLDNEW
« no previous file with comments | « base/utf_string_conversions.cc ('k') | chrome/app/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698