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

Side by Side Diff: base/i18n/icu_string_conversions_unittest.cc

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | base/scoped_native_library.h » ('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) 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 <math.h> 5 #include <math.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <sstream> 10 #include <sstream>
11 11
12 #include "base/format_macros.h" 12 #include "base/format_macros.h"
13 #include "base/i18n/icu_string_conversions.h" 13 #include "base/i18n/icu_string_conversions.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/strings/string_piece.h" 16 #include "base/strings/string_piece.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "build/build_config.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 21
21 namespace base { 22 namespace base {
22 23
23 namespace { 24 namespace {
24 25
25 // Given a null-terminated string of wchar_t with each wchar_t representing 26 // Given a null-terminated string of wchar_t with each wchar_t representing
26 // a UTF-16 code unit, returns a string16 made up of wchar_t's in the input. 27 // a UTF-16 code unit, returns a string16 made up of wchar_t's in the input.
27 // Each wchar_t should be <= 0xFFFF and a non-BMP character (> U+FFFF) 28 // Each wchar_t should be <= 0xFFFF and a non-BMP character (> U+FFFF)
28 // should be represented as a surrogate pair (two UTF-16 units) 29 // should be represented as a surrogate pair (two UTF-16 units)
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 258
258 bool success = ConvertToUtf8AndNormalize( 259 bool success = ConvertToUtf8AndNormalize(
259 kConvertAndNormalizeCases[i].encoded, 260 kConvertAndNormalizeCases[i].encoded,
260 kConvertAndNormalizeCases[i].codepage_name, &result); 261 kConvertAndNormalizeCases[i].codepage_name, &result);
261 EXPECT_EQ(kConvertAndNormalizeCases[i].expected_success, success); 262 EXPECT_EQ(kConvertAndNormalizeCases[i].expected_success, success);
262 EXPECT_EQ(kConvertAndNormalizeCases[i].expected_value, result); 263 EXPECT_EQ(kConvertAndNormalizeCases[i].expected_value, result);
263 } 264 }
264 } 265 }
265 266
266 } // namespace base 267 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/scoped_native_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698