]> granicus.if.org Git - icu/commitdiff
ICU-10273 fix bug in plural rules parser, caused failure of CompactDecimalFormatTest
authorAndy Heninger <andy.heninger@gmail.com>
Thu, 29 Aug 2013 00:50:50 +0000 (00:50 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Thu, 29 Aug 2013 00:50:50 +0000 (00:50 +0000)
X-SVN-Rev: 34111

icu4c/source/i18n/plurrule.cpp
icu4c/source/test/intltest/compactdecimalformattest.cpp

index ad092ef3adc6ae9b3a6247225fad1888ba27ca10..483ab8ac321065e98b32570f9299322b752a36c5 100644 (file)
@@ -428,7 +428,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr
             rangeLowIdx = 0;
             rangeHiIdx  = 1;
             curAndConstraint->value=PLURAL_RANGE_HIGH;
-            curAndConstraint->integerOnly = (type == tIn);
+            curAndConstraint->integerOnly = (type != tWithin);
             break;
         case tNumber:
             U_ASSERT(curAndConstraint != NULL);
index fd57cf63b084a31e66e44b779e4cca04879fb7d6..94cef3f455d2e88e515e10b55e2528a0359278e7 100644 (file)
@@ -276,9 +276,7 @@ void CompactDecimalFormatTest::TestSwahiliShortNegative() {
 }
 
 void CompactDecimalFormatTest::TestArabicLong() {
-  // TODO(andy) This test unexpectedly started failing with the new plural rules.
-  //            Rules for "ar" didn't change.
-  // CheckLocale("ar", UNUM_LONG, kArabicLong, LENGTHOF(kArabicLong));
+  CheckLocale("ar", UNUM_LONG, kArabicLong, LENGTHOF(kArabicLong));
 }
 
 void CompactDecimalFormatTest::TestSignificantDigits() {