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

Unified Diff: app/l10n_util_unittest.cc

Issue 194060: Add a "ToUpper" method (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | « app/l10n_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/l10n_util_unittest.cc
===================================================================
--- app/l10n_util_unittest.cc (revision 25647)
+++ app/l10n_util_unittest.cc (working copy)
@@ -439,3 +439,17 @@
// Japanese that uses multiple scripts
EXPECT_EQ(l10n_util::LEFT_TO_RIGHT, GetTextDirection("ja"));
}
+
+// Test upper and lower case string conversion.
+TEST_F(L10nUtilTest, UpperLower) {
+ string16 mixed(ASCIIToUTF16("Text with UPPer & lowER casE."));
+ const string16 expected_lower(ASCIIToUTF16("text with upper & lower case."));
+ const string16 expected_upper(ASCIIToUTF16("TEXT WITH UPPER & LOWER CASE."));
+
+ string16 result = l10n_util::ToLower(mixed);
+ EXPECT_EQ(result, expected_lower);
+
+ result = l10n_util::ToUpper(mixed);
+ EXPECT_EQ(result, expected_upper);
+}
+
« no previous file with comments | « app/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698