diff options
author | Elliott Hughes <enh@google.com> | 2013-04-16 15:23:58 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-04-16 15:23:58 -0700 |
commit | d4f2bbad3cf3b479e76f4913241e2d45010fbb60 (patch) | |
tree | 6a173b599c4450a815f3238f12def2a1bc3dcb43 /luni/src/test | |
parent | 3b6a95635bfedbd49d3a52cba2c26444685281a2 (diff) | |
download | libcore-d4f2bbad3cf3b479e76f4913241e2d45010fbb60.zip libcore-d4f2bbad3cf3b479e76f4913241e2d45010fbb60.tar.gz libcore-d4f2bbad3cf3b479e76f4913241e2d45010fbb60.tar.bz2 |
Fix Hebrew/Indonesian/Yiddish plural rules.
icu4c doesn't translate the deprecated language codes Java uses back into
the current language codes, so we need to do that ourselves.
Bug: 8619221
Change-Id: I241c33e10547d2858ac08e303d5f0327912a89ff
Diffstat (limited to 'luni/src/test')
-rw-r--r-- | luni/src/test/java/libcore/icu/NativePluralRulesTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/luni/src/test/java/libcore/icu/NativePluralRulesTest.java b/luni/src/test/java/libcore/icu/NativePluralRulesTest.java index ccc3ca6..73699ff 100644 --- a/luni/src/test/java/libcore/icu/NativePluralRulesTest.java +++ b/luni/src/test/java/libcore/icu/NativePluralRulesTest.java @@ -55,4 +55,13 @@ public class NativePluralRulesTest extends junit.framework.TestCase { assertEquals(NativePluralRules.FEW, npr.quantityForInt(103)); assertEquals(NativePluralRules.MANY, npr.quantityForInt(111)); } + + public void testHebrew() throws Exception { + // java.util.Locale will translate "he" to the deprecated "iw". + NativePluralRules he = NativePluralRules.forLocale(new Locale("he")); + assertEquals(NativePluralRules.ONE, he.quantityForInt(1)); + assertEquals(NativePluralRules.TWO, he.quantityForInt(2)); + assertEquals(NativePluralRules.OTHER, he.quantityForInt(3)); + assertEquals(NativePluralRules.MANY, he.quantityForInt(10)); + } } |