summaryrefslogtreecommitdiffstats
path: root/base/string_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/string_util_unittest.cc')
-rw-r--r--base/string_util_unittest.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc
index 1112676..837e000 100644
--- a/base/string_util_unittest.cc
+++ b/base/string_util_unittest.cc
@@ -183,11 +183,6 @@ TEST(StringUtilTest, ConvertUTF8AndWideEmptyString) {
EXPECT_EQ(wempty, UTF8ToWide(empty));
}
-// This tests the current behavior of our UTF-8/UTF-16 conversion. On Windows,
-// we just use the platform functions which strip invalid characters. This isn't
-// necessarily the best behavior, we may want to write our own converter using
-// ICU to get more customized results (for example, substituting the
-// "replacement character" U+FFFD for invalid sequences.
TEST(StringUtilTest, ConvertUTF8ToWide) {
struct UTF8ToWideCase {
const char* utf8;
@@ -206,7 +201,7 @@ TEST(StringUtilTest, ConvertUTF8ToWide) {
{"\xf0\x84\xbd\xa0\xe5\xa5\xbd", L"\x597d", false},
// This UTF-8 character decodes to a UTF-16 surrogate, which is illegal.
{"\xed\xb0\x80", L"", false},
- // Non-BMP character. The result will either be in UTF-16 or UCS-4.
+ // Non-BMP character. The result will either be in UTF-16 or UTF-32.
#if defined(WCHAR_T_IS_UTF16)
{"A\xF0\x90\x8C\x80z", L"A\xd800\xdf00z", true},
#elif defined(WCHAR_T_IS_UTF32)
@@ -270,8 +265,8 @@ TEST(StringUtilTest, ConvertUTF16ToUTF8) {
}
#elif defined(WCHAR_T_IS_UTF32)
-// This test is only valid when wchar_t == UCS-4.
-TEST(StringUtilTest, ConvertUCS4ToUTF8) {
+// This test is only valid when wchar_t == UTF-32.
+TEST(StringUtilTest, ConvertUTF32ToUTF8) {
struct UTF8ToWideCase {
const wchar_t* ucs4;
const char* utf8;