Lines Matching refs:coll
337 RuleBasedCollator *coll; in TestRules() local
341 coll = (RuleBasedCollator *)Collator::createInstance(Locale::getEnglish(), status); in TestRules()
350 coll->getRules(UCOL_TAILORING_ONLY, rules); in TestRules()
355 coll->getRules(UCOL_FULL_RULES, rules); in TestRules()
359 delete coll; in TestRules()
1296 RuleBasedCollator coll(rule, status); in TestMaxExpansion() local
1303 coll.createCollationElementIterator(str); in TestMaxExpansion()
1324 size = coll.getMaxExpansion(order); in TestMaxExpansion()
1339 size = coll.getMaxExpansion(order); in TestMaxExpansion()
1351 size = coll.getMaxExpansion(temporder); in TestMaxExpansion()
1361 size = coll.getMaxExpansion(temporder); in TestMaxExpansion()
1370 size = coll.getMaxExpansion(sorder); in TestMaxExpansion()
1381 size = coll.getMaxExpansion(temporder); in TestMaxExpansion()
1407 Collator *coll = Collator::createInstance("en_US", error); in TestDisplayName() local
1414 coll->getDisplayName(Locale::getCanadaFrench(), result); in TestDisplayName()
1420 coll->getDisplayName(Locale::getSimplifiedChinese(), result); in TestDisplayName()
1425 delete coll; in TestDisplayName()
1431 Collator *coll = Collator::createInstance(error); in TestAttribute() local
1438 coll->setAttribute(UCOL_FRENCH_COLLATION, UCOL_OFF, error); in TestAttribute()
1439 if (coll->getAttribute(UCOL_FRENCH_COLLATION, error) != UCOL_OFF || in TestAttribute()
1444 coll->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, error); in TestAttribute()
1445 if (coll->getAttribute(UCOL_FRENCH_COLLATION, error) != UCOL_ON || in TestAttribute()
1450 coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, error); in TestAttribute()
1451 if (coll->getAttribute(UCOL_ALTERNATE_HANDLING, error) != UCOL_SHIFTED || in TestAttribute()
1456 coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, error); in TestAttribute()
1457 if (coll->getAttribute(UCOL_ALTERNATE_HANDLING, error) != UCOL_NON_IGNORABLE || in TestAttribute()
1462 coll->setAttribute(UCOL_CASE_FIRST, UCOL_LOWER_FIRST, error); in TestAttribute()
1463 if (coll->getAttribute(UCOL_CASE_FIRST, error) != UCOL_LOWER_FIRST || in TestAttribute()
1468 coll->setAttribute(UCOL_CASE_FIRST, UCOL_UPPER_FIRST, error); in TestAttribute()
1469 if (coll->getAttribute(UCOL_CASE_FIRST, error) != UCOL_UPPER_FIRST || in TestAttribute()
1474 coll->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, error); in TestAttribute()
1475 if (coll->getAttribute(UCOL_CASE_LEVEL, error) != UCOL_ON || in TestAttribute()
1480 coll->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, error); in TestAttribute()
1481 if (coll->getAttribute(UCOL_CASE_LEVEL, error) != UCOL_OFF || in TestAttribute()
1486 coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, error); in TestAttribute()
1487 if (coll->getAttribute(UCOL_NORMALIZATION_MODE, error) != UCOL_ON || in TestAttribute()
1492 coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, error); in TestAttribute()
1493 if (coll->getAttribute(UCOL_NORMALIZATION_MODE, error) != UCOL_OFF || in TestAttribute()
1498 coll->setAttribute(UCOL_STRENGTH, UCOL_PRIMARY, error); in TestAttribute()
1499 if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_PRIMARY || in TestAttribute()
1504 coll->setAttribute(UCOL_STRENGTH, UCOL_SECONDARY, error); in TestAttribute()
1505 if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_SECONDARY || in TestAttribute()
1510 coll->setAttribute(UCOL_STRENGTH, UCOL_TERTIARY, error); in TestAttribute()
1511 if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_TERTIARY || in TestAttribute()
1516 coll->setAttribute(UCOL_STRENGTH, UCOL_QUATERNARY, error); in TestAttribute()
1517 if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_QUATERNARY || in TestAttribute()
1522 coll->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, error); in TestAttribute()
1523 if (coll->getAttribute(UCOL_STRENGTH, error) != UCOL_IDENTICAL || in TestAttribute()
1528 delete coll; in TestAttribute()
1538 Collator *coll = Collator::createInstance(Locale::getRoot(), status); in TestVariableTopSetting() local
1540 delete coll; in TestVariableTopSetting()
1545 uint32_t oldVarTop = coll->getVariableTop(status); in TestVariableTopSetting()
1551 (void)coll->setVariableTop(vt, 1, status); in TestVariableTopSetting()
1558 uint32_t newVarTop = coll->setVariableTop(vt, 1, status); in TestVariableTopSetting()
1563 if(newVarTop != coll->getVariableTop(status)) { in TestVariableTopSetting()
1569 uint32_t newVarTop2 = coll->setVariableTop(euro, status); in TestVariableTopSetting()
1571 (int64_t)newVarTop2, (int64_t)coll->getVariableTop(status)); in TestVariableTopSetting()
1575 coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status); in TestVariableTopSetting()
1576 …assertEquals("empty==dollar", (int32_t)UCOL_EQUAL, (int32_t)coll->compare(UnicodeString(), dollar)… in TestVariableTopSetting()
1577 assertEquals("empty==euro", (int32_t)UCOL_EQUAL, (int32_t)coll->compare(UnicodeString(), euro)); in TestVariableTopSetting()
1578 …assertEquals("dollar<zero", (int32_t)UCOL_LESS, (int32_t)coll->compare(dollar, UnicodeString((UCha… in TestVariableTopSetting()
1580 coll->setVariableTop(oldVarTop, status); in TestVariableTopSetting()
1582 uint32_t newerVarTop = coll->setVariableTop(UnicodeString(vt, 1), status); in TestVariableTopSetting()
1588 delete coll; in TestVariableTopSetting()
1594 LocalPointer<Collator> coll(Collator::createInstance(Locale::getRoot(), errorCode)); in TestMaxVariable() local
1600 (void)coll->setMaxVariable(UCOL_REORDER_CODE_OTHERS, errorCode); in TestMaxVariable()
1606 (void)coll->setMaxVariable(UCOL_REORDER_CODE_CURRENCY, errorCode); in TestMaxVariable()
1608 if(UCOL_REORDER_CODE_CURRENCY != coll->getMaxVariable()) { in TestMaxVariable()
1612 coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, errorCode); in TestMaxVariable()
1613 …assertEquals("empty==dollar", (int32_t)UCOL_EQUAL, (int32_t)coll->compare(UnicodeString(), Unicode… in TestMaxVariable()
1614 …assertEquals("empty==euro", (int32_t)UCOL_EQUAL, (int32_t)coll->compare(UnicodeString(), UnicodeSt… in TestMaxVariable()
1615 …assertEquals("dollar<zero", (int32_t)UCOL_LESS, (int32_t)coll->compare(UnicodeString((UChar)0x24),… in TestMaxVariable()
1623 Collator *coll = Collator::createInstance("root", status); in TestGetLocale() local
1628 Locale locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status); in TestGetLocale()
1634 delete coll; in TestGetLocale()
1636 coll = Collator::createInstance("", status); in TestGetLocale()
1641 locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status); in TestGetLocale()
1647 delete coll; in TestGetLocale()
1686 coll = Collator::createInstance(testStruct[i].requestedLocale, status); in TestGetLocale()
1689 delete coll; in TestGetLocale()
1694 locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status); in TestGetLocale()
1702 locale = coll->getLocale(ULOC_VALID_LOCALE, status); in TestGetLocale()
1707 locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status); in TestGetLocale()
1723 if(*coll2 != *coll) { in TestGetLocale()
1727 delete coll; in TestGetLocale()
1732 LocalPointer<Collator> coll(Collator::createInstance("blahaha", status)); in TestGetLocale() local
1737 Locale valid = coll->getLocale(ULOC_VALID_LOCALE, status); in TestGetLocale()
1742 Locale actual = coll->getLocale(ULOC_ACTUAL_LOCALE, status); in TestGetLocale()
1752 coll = new RuleBasedCollator(rlz, status); in TestGetLocale()
1753 locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status); in TestGetLocale()
1758 locale = coll->getLocale(ULOC_VALID_LOCALE, status); in TestGetLocale()
1762 locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status); in TestGetLocale()
1766 delete coll; in TestGetLocale()
1787 Collator *coll = Collator::createInstance(Locale("sh"), status); in TestBounds() local
1789 delete coll; in TestBounds()
1879 skSize = coll->getSortKey(buffer, buffSize, tests[i].key, 512); in TestBounds()
1886 lowerSize = coll->getBound(tests[i].key, -1, UCOL_BOUND_LOWER, 1, lower, 512, status); in TestBounds()
1887 upperSize = coll->getBound(tests[j].key, -1, UCOL_BOUND_UPPER, 1, upper, 512, status); in TestBounds()
1902 skSize = coll->getSortKey(buffer, buffSize, sortkey, 512); in TestBounds()
1907 skSize = coll->getSortKey(buffer, buffSize, sortkey, 512); in TestBounds()
1916 delete coll; in TestBounds()
1939 RuleBasedCollator coll(buff, status); in TestGetTailoredSet() local
1941 set = coll.getTailoredSet(status); in TestGetTailoredSet()
1965 RuleBasedCollator *coll in TestUClassID() local
1968 delete coll; in TestUClassID()
1972 id = *((char *)coll->getDynamicClassID()); in TestUClassID()
1990 CollationElementIterator *iter = coll->createCollationElementIterator(str); in TestUClassID()
1997 delete coll; in TestUClassID()
2309 RuleBasedCollator *coll = new RuleBasedCollator(UnicodeString(buf, len), status); in TestNULLCharTailoring() local
2311 delete coll; in TestNULLCharTailoring()
2315 UCollationResult res = coll->compare(first, second, status); in TestNULLCharTailoring()
2319 delete coll; in TestNULLCharTailoring()
2373 LocalPointer<Collator> coll(Collator::createInstance("de@collation=phonebook", errorCode)); in TestCloneBinary() local
2378 RuleBasedCollator *rbc = dynamic_cast<RuleBasedCollator *>(coll.getAlias()); in TestCloneBinary()
2426 RuleBasedCollator coll(UnicodeString("[reorder Hang Hani]"), errorCode); in TestIterNumeric() local
2430 coll.setAttribute(UCOL_NUMERIC_COLLATION, UCOL_ON, errorCode); in TestIterNumeric()
2434 UCollationResult result = coll.compare(iter40, iter72, errorCode); in TestIterNumeric()
2444 LocalPointer<Collator> coll(Collator::createInstance(bogusLocale, errorCode)); in TestBadKeywords() local
2453 coll.adoptInstead(Collator::createInstance(localeID, errorCode)); in TestBadKeywords()
2462 coll.adoptInstead(Collator::createInstance(localeID, errorCode)); in TestBadKeywords()
2474 coll.adoptInstead(Collator::createInstance(localeID, errorCode)); in TestBadKeywords()
2513 RuleBasedCollator coll(u"&[before 1]\uFDD1€<*\u4E00-\u9FFF", errorCode); in TestGapTooSmall() local
2514 assertTrue("tailored Han before currency", coll.compare(u"\u4E00", u"$", errorCode) < 0); in TestGapTooSmall()