• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ICU-531.30/icuSources/test/intltest/

Lines Matching +defs:target +defs: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;
170 col = Collator::createInstance(Locale::getFrench(), success);
177 col->setStrength(Collator::PRIMARY);
179 doAssert((col->getStrength() != Collator::TERTIARY), "collation object has the wrong strength");
180 doAssert((col->getStrength() == Collator::PRIMARY), "collation object's strength is not primary difference");
183 col->setStrength(Collator::TERTIARY);
184 doAssert((col->getStrength() == Collator::TERTIARY), "collation object's strength is not tertiary difference");
185 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
186 doAssert((col->getStrength() != Collator::SECONDARY), "collation object's strength is secondary difference");
197 delete col;
201 delete col;
202 col = Collator::createInstance(success);
210 doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator *)junk)->getRules(),
216 delete col;
230 delete col;
384 Collator *col;
407 col = someCollators[index]->safeClone();
408 if (col == 0) {
412 col->setStrength(Collator::TERTIARY);
414 col->setAttribute(UCOL_CASE_LEVEL, UCOL_OFF, err);
417 doAssert(col->greater(test1, test2), "Result should be \"abCda\" >>> \"abcda\" ");
419 delete col;
487 Collator *col = 0;
489 col = Collator::createInstance(Locale::getEnglish(), success);
495 col->setStrength(Collator::TERTIARY);
510 col->getCollationKey(NULL, 0, sortkEmpty, key1Status);
524 col->getCollationKey(UnicodeString((UChar)1).append((UChar)0x34f), sortkIgnorable, key1Status);
533 col->getCollationKey(NULL, 0, sortk1, key1Status);
540 col->getCollationKey(test1, sortk1, key1Status);
545 doAssert((sortk1.compareTo(col->getCollationKey(test2, sortk2, key2Status)))
606 col->setStrength(Collator::SECONDARY);
607 doAssert(col->getCollationKey(test1, sortk1, key1Status).compareTo(
608 col->getCollationKey(test2, sortk2, key2Status))
611 delete col;
622 Collator *col = 0;
624 col = Collator::createInstance(Locale::getEnglish(), success);
634 CollationElementIterator *iterator1 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
637 CollationElementIterator *coliter=((RuleBasedCollator*)col)->createCollationElementIterator(*chariter);
640 CollationElementIterator *iterator2 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1);
641 CollationElementIterator *iterator3 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString2);
804 delete col;
946 Collator *col = 0;
948 col = Collator::createInstance(Locale::getEnglish(), success);
956 doAssert((!col->equals(test1, test2) ), "Result should be \"Abcda\" != \"abcda\"");
957 doAssert((col->greater(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
958 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
960 col->setStrength(Collator::SECONDARY);
963 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
964 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
965 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
967 col->setStrength(Collator::PRIMARY);
970 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
971 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
972 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
980 doAssert((col->compare(test1, test2) == Collator::EQUAL), "Problem");
981 doAssert((col->compare(test1, test2, success) == UCOL_EQUAL), "Problem");
982 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::EQUAL), "Problem");
983 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_EQUAL), "Problem");
984 doAssert((col->compare(test1, test2, t1Len) == Collator::EQUAL), "Problem");
985 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_EQUAL), "Problem");
987 col->setAttribute(UCOL_STRENGTH, UCOL_TERTIARY, success);
988 doAssert((col->compare(test1, test2) == Collator::GREATER), "Problem");
989 doAssert((col->compare(test1, test2, success) == UCOL_GREATER), "Problem");
990 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::GREATER), "Problem");
991 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_GREATER), "Problem");
992 doAssert((col->compare(test1, test2, t1Len) == Collator::GREATER), "Problem");
993 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_GREATER), "Problem");
998 delete col;
1073 Collator *col = Collator::createInstance(Locale::getEnglish(), status);
1079 if (col->getStrength() != Collator::TERTIARY)
1085 col->setAttribute(UCOL_STRENGTH, UCOL_IDENTICAL, status);
1098 col->getCollationKey(test1, u_strlen(test1), key1, status);
1101 col->getCollationKey(test2, u_strlen(test2), key2, status);
1104 col->getCollationKey(test3, u_strlen(test3), key3, status);
1119 col->getSortKey(test1, sortkey1, 64);
1120 col->getSortKey(test2, sortkey2, 64);
1121 col->getSortKey(test3, sortkey3, 64);
1133 col->getSortKey(test1, 5, sortkey1, 64);
1134 col->getSortKey(test2, 5, sortkey2, 64);
1135 col->getSortKey(test3, 5, sortkey3, 64);
1148 col->getSortKey(strtest1, sortkey1, 64);
1150 col->getSortKey(strtest2, sortkey2, 64);
1152 col->getSortKey(strtest3, sortkey3, 64);
1165 col->setStrength(Collator::SECONDARY);
1167 col->getCollationKey(test1, u_strlen(test1), key1, status);
1168 col->getCollationKey(test2, u_strlen(test2), key2, status);
1169 col->getCollationKey(test3, u_strlen(test3), key3, status);
1180 col->getSortKey(test1, sortkey1, 64);
1181 col->getSortKey(test2, sortkey2, 64);
1182 col->getSortKey(test3, sortkey3, 64);
1194 col->getSortKey(test1, 5, sortkey1, 64);
1195 col->getSortKey(test2, 5, sortkey2, 64);
1196 col->getSortKey(test3, 5, sortkey3, 64);
1208 col->getSortKey(strtest1, sortkey1, 64);
1209 col->getSortKey(strtest2, sortkey2, 64);
1210 col->getSortKey(strtest3, sortkey3, 64);
1223 delete col;
1228 LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
1232 col->setAttribute(UCOL_STRENGTH, UCOL_PRIMARY, errorCode);
1238 int32_t length = col->getSortKey(i_and_phi, 2, sortKey, LENGTHOF(sortKey));
1242 int32_t length2 = col->getSortKey(i_and_phi, 2, sortKey2, capacity);
1261 length = col->getSortKey(s, longSortKey.getAlias(), longCapacity);
1263 col->getCollationKey(s, collKey, errorCode);
1983 const UnicodeString& target,
1986 const UnicodeString& target,
1991 const UChar* target,
2049 const UnicodeString& target,
2053 return UCollationResult(source.compare(target));
2060 const UnicodeString& target,
2065 return UCollationResult(source.compare(0, length, target));
2073 const UChar* target,
2078 UnicodeString t(target, targetLength);