Lines Matching refs:PluralRules
24 UBool checkEqual(const PluralRules &test, char *result, int32_t max);
25 UBool testEquality(const PluralRules &test);
46 * Test various generic API methods of PluralRules for API coverage.
92 logln("Testing PluralRules constructors");
97 PluralRules defRule(status);
98 LocalPointer<PluralRules> test(new PluralRules(status));
99 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(), status));
101 dataerrln("ERROR: Could not create PluralRules (default) - exitting");
106 LocalPointer<PluralRules> dupRule(defRule.clone());
123 logln("Testing Simple PluralRules");
125 LocalPointer<PluralRules> empRule(test->createRules(UNICODE_STRING_SIMPLE("a:n"), status));
135 logln("Testing Simple PluralRules");
141 LocalPointer<PluralRules> newRules(test->createRules(pluralTestData[i], status));
150 logln("Testing Complex PluralRules");
170 LocalPointer<PluralRules> newRules(test->createRules(complexRule, status));
187 dataerrln("ERROR: Could not create PluralRules for testing fractions - exitting");
200 logln("Testing Equality of PluralRules");
211 if(test->getDynamicClassID() != PluralRules::getStaticClassID()) {
215 LocalPointer<PluralRules> en_UK(test->forLocale(Locale::getUK(), status));
216 LocalPointer<PluralRules> en(test->forLocale(Locale::getEnglish(), status));
223 LocalPointer<PluralRules> zh_Hant(test->forLocale(Locale::getTaiwan(), status));
224 LocalPointer<PluralRules> zh(test->forLocale(Locale::getChinese(), status));
247 UBool checkEqual(const PluralRules &test, char *result, int32_t max) {
261 UBool testEquality(const PluralRules &test) {
278 PluralRules* rules[MAX_EQ_COL];
319 PluralRules *pr = PluralRules::createRules(rule, status);
352 PluralRules *rules = PluralRules::forLocale(locales[i], status);
400 PluralRules *rules = PluralRules::createRules("a: n mod 10 in 5..8", status);
449 PluralRules *p = PluralRules::createRules(ruleDescription, status);
541 LocalPointer<PluralRules> pr(PluralRules::forLocale("en", UPLURAL_TYPE_ORDINAL, errorCode));
542 if (errorCode.logIfFailureAndReset("PluralRules::forLocale(en, UPLURAL_TYPE_ORDINAL) failed")) {
547 dataerrln("PluralRules(en-ordinal).select(2) failed");