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

Unified Diff: base/i18n/case_conversion_unittest.cc

Issue 1104483002: added test to test case converting with nonASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/case_conversion_unittest.cc
diff --git a/base/i18n/case_conversion_unittest.cc b/base/i18n/case_conversion_unittest.cc
index 38e2c6878228de468124d80a7aabfddebf2eec0f..3bea75ef4b3bb55520bdcdc006354e09dd479de3 100644
--- a/base/i18n/case_conversion_unittest.cc
+++ b/base/i18n/case_conversion_unittest.cc
@@ -22,7 +22,17 @@ TEST(CaseConversionTest, UpperLower) {
EXPECT_EQ(expected_upper, result);
}
-// TODO(jshin): More tests are needed, especially with non-ASCII characters.
+TEST(CaseConversionTest, nonASCII) {
+ string16 mixed(UTF8ToUTF16(u8"ÄÖäö Ïï ÷%¤#*^`@£$‰‚~ ἇἏ Ḁḁ"));
jungshik at Google 2015/04/27 18:25:51 MSVC does not support 'u8', yet, IIRC. It cannot e
+ const string16 expected_lower(UTF8ToUTF16(u8"äöäö ïï ÷%¤#*^`@£$‰‚~ ἇἇ ḁḁ"));
jungshik at Google 2015/04/27 18:25:51 Add a test with Turkish dotless i and try case con
+ const string16 expected_upper(UTF8ToUTF16(u8"ÄÖÄÖ ÏÏ ÷%¤#*^`@£$‰‚~ ἏἏ ḀḀ"));
+
+ string16 result = base::i18n::ToLower(mixed);
+ EXPECT_EQ(expected_lower, result);
+
+ result = base::i18n::ToUpper(mixed);
+ EXPECT_EQ(expected_upper, result);
+}
} // namespace
} // namespace base
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698