diff options
Diffstat (limited to 'tests/src/com/android/inputmethod')
-rw-r--r-- | tests/src/com/android/inputmethod/keyboard/SpacebarTextTests.java | 3 | ||||
-rw-r--r-- | tests/src/com/android/inputmethod/latin/StringUtilsTests.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/SpacebarTextTests.java b/tests/src/com/android/inputmethod/keyboard/SpacebarTextTests.java index 1398db97c..864e78f43 100644 --- a/tests/src/com/android/inputmethod/keyboard/SpacebarTextTests.java +++ b/tests/src/com/android/inputmethod/keyboard/SpacebarTextTests.java @@ -113,7 +113,8 @@ public class SpacebarTextTests extends AndroidTestCase { final String subtypeName = SubtypeLocale.getSubtypeDisplayName(subtype); final Locale locale = SubtypeLocale.getSubtypeLocale(subtype); final String spacebarText = MainKeyboardView.getShortDisplayName(subtype); - final String languageCode = StringUtils.toTitleCase(locale.getLanguage(), locale); + final String languageCode = StringUtils.capitalizeFirstCharacter( + locale.getLanguage(), locale); if (SubtypeLocale.isNoLanguage(subtype)) { assertEquals(subtypeName, "", spacebarText); } else { diff --git a/tests/src/com/android/inputmethod/latin/StringUtilsTests.java b/tests/src/com/android/inputmethod/latin/StringUtilsTests.java index 966919ed3..9760f0bd1 100644 --- a/tests/src/com/android/inputmethod/latin/StringUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/StringUtilsTests.java @@ -106,9 +106,7 @@ public class StringUtilsTests extends AndroidTestCase { StringUtils.toTitleCase("iab", new Locale("tr"))); assertEquals("Aib", StringUtils.toTitleCase("AİB", new Locale("tr"))); - // For one character, toTitleCase returns the string as is. Not sure what the motivation - // is, but that's how it works now. - assertEquals("a", + assertEquals("A", StringUtils.toTitleCase("a", Locale.ENGLISH)); assertEquals("A", StringUtils.toTitleCase("A", Locale.ENGLISH)); |