Home | History | Annotate | Download | only in intltest

Lines Matching refs:col

66     Collator *col = 0;
82 col = Collator::createInstance(Locale::getEnglish(), success);
88 StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);
95 col->getVersion(versionArray);
106 doAssert((col->compare("ab", "abc") == Collator::LESS), "ab < abc comparison failed");
107 doAssert((col->compare("ab", "AB") == Collator::LESS), "ab < AB comparison failed");
108 doAssert((col->compare("blackbird", "black-bird") == Collator::GREATER), "black-bird > blackbird comparison failed");
109 doAssert((col->compare("black bird", "black-bird") == Collator::LESS), "black bird > black-bird comparison failed");
110 doAssert((col->compare("Hello", "hello") == Collator::GREATER), "Hello > hello comparison failed");
111 doAssert((col->compare("","",success) == UCOL_EQUAL), "Comparison between empty strings failed");
113 doAssert((col->compareUTF8("\x61\x62\xc3\xa4", "\x61\x62\xc3\x9f", success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UTF-8 comparison failed");
121 doAssert((col->compare(abauIter, abssIter, success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UCharIterator comparison failed");
126 doAssert((col->compare("ab", "abc", 2) == Collator::EQUAL), "ab = abc with length 2 comparison failed");
127 doAssert((col->compare("ab", "AB", 2) == Collator::LESS), "ab < AB with length 2 comparison failed");
128 doAssert((col->compare("ab", "Aa", 1) == Collator::LESS), "ab < Aa with length 1 comparison failed");
129 doAssert((col->compare("ab", "Aa", 2) == Collator::GREATER), "ab > Aa with length 2 comparison failed");
130 doAssert((col->compare("black-bird", "blackbird", 5) == Collator::EQUAL), "black-bird = blackbird with length of 5 comparison failed");
131 doAssert((col->compare("black bird", "black-bird", 10) == Collator::LESS), "black bird < black-bird with length 10 comparison failed");
132 doAssert((col->compare("Hello", "hello", 5) == Collator::GREATER), "Hello > hello with length 5 comparison failed");
138 doAssert((col->getStrength() == Collator::TERTIARY), "collation object has the wrong strength");
139 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
143 col->setStrength(Collator::SECONDARY);
144 doAssert((col->getStrength() != Collator::TERTIARY), "collation object's strength is secondary difference");
145 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
146 doAssert((col->getStrength() == Collator::SECONDARY), "collation object has the wrong strength");
164 delete col; col = 0;
179 col = Collator::createInstance(Locale::getFrench(), success);
186 col->setStrength(Collator::PRIMARY);
188 doAssert((col->getStrength() != Collator::TERTIARY), "collation object has the wrong strength");
189 doAssert((col->getStrength() == Collator::PRIMARY), "collation object's strength is not primary difference");
192 col->setStrength(Collator::TERTIARY);
193 doAssert((col->getStrength() == Collator::TERTIARY), "collation object's strength is not tertiary difference");
194 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
195 doAssert((col->getStrength() != Collator::SECONDARY), "collation object's strength is secondary difference");
196 delete col;
382 Collator *col;
405 col = someCollators[index]->safeClone();
406 if (col == 0) {
410 col->setStrength(Collator::TERTIARY);
412 col->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, err);
415 doAssert(col->greater(test1, test2), "Result should be \"abCda\" >>> \"abcda\" ");
417 delete col;
485 Collator *col = 0;
487 col = Collator::createInstance(Locale::getEnglish(), success);
493 col->setStrength(Collator::TERTIARY);
508 col->getCollationKey(NULL, 0, sortkEmpty, key1Status);
522 col->getCollationKey(UnicodeString((UChar)1).append((UChar)0x34f), sortkIgnorable, key1Status);
531 col->getCollationKey(NULL, 0, sortk1, key1Status);
538 col->getCollationKey(test1, sortk1, key1Status);
543 doAssert((sortk1.compareTo(col->getCollationKey(test2, sortk2, key2Status)))
604 col->setStrength(Collator::SECONDARY);
605 doAssert(col->getCollationKey(test1, sortk1, key1Status).compareTo(
606 col->getCollationKey(test2, sortk2, key2Status))
609 delete col;
620 Collator *col = 0;
622 col = Collator::createInstance(Locale::getEnglish(), success);
632 CollationElementIterator *iterator1 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
635 CollationElementIterator *coliter=((RuleBasedCollator*)col)->createCollationElementIterator(*chariter);
638 CollationElementIterator *iterator2 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
639 CollationElementIterator *iterator3 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString2);
802 delete col;
944 Collator *col = 0;
946 col = Collator::createInstance(Locale::getEnglish(), success);
954 doAssert((!col->equals(test1, test2) ), "Result should be \"Abcda\" != \"abcda\"");
955 doAssert((col->greater(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
956 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
958 col->setStrength(Collator::SECONDARY);
961 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
962 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
963 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
965 col->setStrength(Collator::PRIMARY);
968 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
969 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
970 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
978 doAssert((col->compare(test1, test2) == Collator::EQUAL), "Problem");
979 doAssert((col->compare(test1, test2, success) == UCOL_EQUAL), "Problem");
980 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::EQUAL), "Problem");
981 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_EQUAL), "Problem");
982 doAssert((col->compare(test1, test2, t1Len) == Collator::EQUAL), "Problem");
983 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_EQUAL), "Problem");
985 col->setAttribute(UCOL_STRENGTH, UCOL_TERTIARY, success);
986 doAssert((col->compare(test1, test2) == Collator::GREATER), "Problem");
987 doAssert((col->compare(test1, test2, success) == UCOL_GREATER), "Problem");
988 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::GREATER), "Problem");
989 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_GREATER), "Problem");
990 doAssert((col->compare(test1, test2, t1Len) == Collator::GREATER), "Problem");
991 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_GREATER), "Problem");
996 delete col;
1068 Collator *col = Collator::createInstance(Locale::getEnglish(), status);
1074 if (col->getStrength() != Collator::TERTIARY)
1080 col->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, status);
1093 col->getCollationKey(test1, u_strlen(test1), key1, status);
1096 col->getCollationKey(test2, u_strlen(test2), key2, status);
1099 col->getCollationKey(test3, u_strlen(test3), key3, status);
1114 col->getSortKey(test1, sortkey1, 64);
1115 col->getSortKey(test2, sortkey2, 64);
1116 col->getSortKey(test3, sortkey3, 64);
1128 col->getSortKey(test1, 5, sortkey1, 64);
1129 col->getSortKey(test2, 5, sortkey2, 64);
1130 col->getSortKey(test3, 5, sortkey3, 64);
1143 col->getSortKey(strtest1, sortkey1, 64);
1145 col->getSortKey(strtest2, sortkey2, 64);
1147 col->getSortKey(strtest3, sortkey3, 64);
1160 col->setStrength(Collator::SECONDARY);
1162 col->getCollationKey(test1, u_strlen(test1), key1, status);
1163 col->getCollationKey(test2, u_strlen(test2), key2, status);
1164 col->getCollationKey(test3, u_strlen(test3), key3, status);
1175 col->getSortKey(test1, sortkey1, 64);
1176 col->getSortKey(test2, sortkey2, 64);
1177 col->getSortKey(test3, sortkey3, 64);
1189 col->getSortKey(test1, 5, sortkey1, 64);
1190 col->getSortKey(test2, 5, sortkey2, 64);
1191 col->getSortKey(test3, 5, sortkey3, 64);
1203 col->getSortKey(strtest1, sortkey1, 64);
1204 col->getSortKey(strtest2, sortkey2, 64);
1205 col->getSortKey(strtest3, sortkey3, 64);
1218 delete col;
1223 LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
1227 col->setAttribute(UCOL_STRENGTH, UCOL_PRIMARY, errorCode);
1233 int32_t length = col->getSortKey(i_and_phi, 2, sortKey, UPRV_LENGTHOF(sortKey));
1237 int32_t length2 = col->getSortKey(i_and_phi, 2, sortKey2, capacity);
1256 length = col->getSortKey(s, longSortKey.getAlias(), longCapacity);
1258 col->getCollationKey(s, collKey, errorCode);