From 6ddf597269108c1a4da957cd206c66d6c3f431a6 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 29 Aug 2013 00:50:50 +0000 Subject: [PATCH] ICU-10273 fix bug in plural rules parser, caused failure of CompactDecimalFormatTest X-SVN-Rev: 34111 --- icu4c/source/i18n/plurrule.cpp | 2 +- icu4c/source/test/intltest/compactdecimalformattest.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/icu4c/source/i18n/plurrule.cpp b/icu4c/source/i18n/plurrule.cpp index ad092ef3ad..483ab8ac32 100644 --- a/icu4c/source/i18n/plurrule.cpp +++ b/icu4c/source/i18n/plurrule.cpp @@ -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); diff --git a/icu4c/source/test/intltest/compactdecimalformattest.cpp b/icu4c/source/test/intltest/compactdecimalformattest.cpp index fd57cf63b0..94cef3f455 100644 --- a/icu4c/source/test/intltest/compactdecimalformattest.cpp +++ b/icu4c/source/test/intltest/compactdecimalformattest.cpp @@ -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() {