Lines Matching refs:strsrch

254 UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,  in assertEqualWithStringSearch()  argument
263 strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, search->elemCompare, status); in assertEqualWithStringSearch()
269 if (strsrch->getMatchedStart() != USEARCH_DONE || in assertEqualWithStringSearch()
270 strsrch->getMatchedLength() != 0) { in assertEqualWithStringSearch()
277 strsrch->next(status); in assertEqualWithStringSearch()
278 if (matchindex != strsrch->getMatchedStart() || in assertEqualWithStringSearch()
279 matchlength != strsrch->getMatchedLength()) { in assertEqualWithStringSearch()
280 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
282 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
285 strsrch->getMatchedStart(), strsrch->getMatchedLength(), in assertEqualWithStringSearch()
291 strsrch->getMatchedText(matchtext); in assertEqualWithStringSearch()
294 strsrch->getText().compareBetween(matchindex, in assertEqualWithStringSearch()
303 strsrch->next(status); in assertEqualWithStringSearch()
304 if (strsrch->getMatchedStart() != USEARCH_DONE || in assertEqualWithStringSearch()
305 strsrch->getMatchedLength() != 0) { in assertEqualWithStringSearch()
306 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
308 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
311 strsrch->getMatchedStart(), strsrch->getMatchedLength()); in assertEqualWithStringSearch()
320 strsrch->previous(status); in assertEqualWithStringSearch()
321 if (matchindex != strsrch->getMatchedStart() || in assertEqualWithStringSearch()
322 matchlength != strsrch->getMatchedLength()) { in assertEqualWithStringSearch()
323 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
325 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
328 strsrch->getMatchedStart(), strsrch->getMatchedLength(), in assertEqualWithStringSearch()
333 strsrch->getMatchedText(matchtext); in assertEqualWithStringSearch()
336 strsrch->getText().compareBetween(matchindex, in assertEqualWithStringSearch()
346 strsrch->previous(status); in assertEqualWithStringSearch()
347 if (strsrch->getMatchedStart() != USEARCH_DONE || in assertEqualWithStringSearch()
348 strsrch->getMatchedLength() != 0) { in assertEqualWithStringSearch()
349 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
351 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
354 strsrch->getMatchedStart(), strsrch->getMatchedLength()); in assertEqualWithStringSearch()
359 UBool isOverlap = (strsrch->getAttribute(USEARCH_OVERLAP) == USEARCH_ON); in assertEqualWithStringSearch()
367 strsrch->following(nextStart, status); in assertEqualWithStringSearch()
370 if (strsrch->getMatchedStart() != USEARCH_DONE || in assertEqualWithStringSearch()
371 strsrch->getMatchedLength() != 0) { in assertEqualWithStringSearch()
372 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
374 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
378 strsrch->getMatchedStart(), strsrch->getMatchedLength()); in assertEqualWithStringSearch()
386 if (strsrch->getMatchedStart() != matchindex in assertEqualWithStringSearch()
387 || strsrch->getMatchedLength() != matchlength in assertEqualWithStringSearch()
389 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
391 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
395 strsrch->getMatchedStart(), strsrch->getMatchedLength(), in assertEqualWithStringSearch()
400 if (isOverlap || strsrch->getMatchedLength() == 0) { in assertEqualWithStringSearch()
401 nextStart = strsrch->getMatchedStart() + 1; in assertEqualWithStringSearch()
403 nextStart = strsrch->getMatchedStart() + strsrch->getMatchedLength(); in assertEqualWithStringSearch()
415 nextStart = strsrch->getText().length(); in assertEqualWithStringSearch()
418 strsrch->preceding(nextStart, status); in assertEqualWithStringSearch()
421 if (strsrch->getMatchedStart() != USEARCH_DONE || strsrch->getMatchedLength() != 0) { in assertEqualWithStringSearch()
422 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
424 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
428 strsrch->getMatchedStart(), in assertEqualWithStringSearch()
429 strsrch->getMatchedLength()); in assertEqualWithStringSearch()
438 if (strsrch->getMatchedStart() != matchindex in assertEqualWithStringSearch()
439 || strsrch->getMatchedLength() != matchlength in assertEqualWithStringSearch()
441 char *str = toCharString(strsrch->getText()); in assertEqualWithStringSearch()
443 str = toCharString(strsrch->getPattern()); in assertEqualWithStringSearch()
447 strsrch->getMatchedStart(), strsrch->getMatchedLength(), in assertEqualWithStringSearch()
456 strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, USEARCH_STANDARD_ELEMENT_COMPARISON, status); in assertEqualWithStringSearch()
466 StringSearch *strsrch, *strsrch2; in assertEqual() local
487 strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator, in assertEqual()
494 if (!assertEqualWithStringSearch(strsrch, search)) { in assertEqual()
496 delete strsrch; in assertEqual()
501 strsrch2 = strsrch->clone(); in assertEqual()
502 if( strsrch2 == strsrch || *strsrch2 != *strsrch || in assertEqual()
507 delete strsrch; in assertEqual()
514 delete strsrch; in assertEqual()
523 StringSearch *strsrch; in assertCanonicalEqual() local
547 strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator, in assertCanonicalEqual()
549 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in assertCanonicalEqual()
556 if (!assertEqualWithStringSearch(strsrch, search)) { in assertCanonicalEqual()
564 delete strsrch; in assertCanonicalEqual()
576 StringSearch *strsrch; in assertEqualWithAttribute() local
599 strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator, in assertEqualWithAttribute()
601 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, canonical, status); in assertEqualWithAttribute()
602 strsrch->setAttribute(USEARCH_OVERLAP, overlap, status); in assertEqualWithAttribute()
609 if (!assertEqualWithStringSearch(strsrch, search)) { in assertEqualWithAttribute()
611 delete strsrch; in assertEqualWithAttribute()
615 delete strsrch; in assertEqualWithAttribute()
879 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestBreakIterator() local
885 strsrch->setBreakIterator(NULL, status); in TestBreakIterator()
886 if (U_FAILURE(status) || strsrch->getBreakIterator() != NULL) { in TestBreakIterator()
890 strsrch->setBreakIterator(m_en_characterbreaker_, status); in TestBreakIterator()
892 strsrch->getBreakIterator() != m_en_characterbreaker_) { in TestBreakIterator()
896 strsrch->setBreakIterator(m_en_wordbreaker_, status); in TestBreakIterator()
898 strsrch->getBreakIterator() != m_en_wordbreaker_) { in TestBreakIterator()
902 delete strsrch; in TestBreakIterator()
910 StringSearch *strsrch; in TestBreakIterator() local
921 strsrch = new StringSearch(pattern, text, collator, breaker, status); in TestBreakIterator()
923 strsrch->getBreakIterator() != breaker) { in TestBreakIterator()
925 if (strsrch != NULL) { in TestBreakIterator()
926 delete strsrch; in TestBreakIterator()
929 if (!assertEqualWithStringSearch(strsrch, search)) { in TestBreakIterator()
931 delete strsrch; in TestBreakIterator()
938 strsrch->setBreakIterator(breaker, status); in TestBreakIterator()
940 strsrch->getBreakIterator() != breaker) { in TestBreakIterator()
942 delete strsrch; in TestBreakIterator()
944 strsrch->reset(); in TestBreakIterator()
945 if (!assertEqualWithStringSearch(strsrch, search)) { in TestBreakIterator()
948 delete strsrch; in TestBreakIterator()
1013 StringSearch *strsrch = new StringSearch(pattern, text, in TestOverlap() local
1017 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status); in TestOverlap()
1019 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) { in TestOverlap()
1022 if (!assertEqualWithStringSearch(strsrch, search)) { in TestOverlap()
1023 delete strsrch; in TestOverlap()
1028 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status); in TestOverlap()
1030 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) { in TestOverlap()
1033 strsrch->reset(); in TestOverlap()
1034 if (!assertEqualWithStringSearch(strsrch, search)) { in TestOverlap()
1035 delete strsrch; in TestOverlap()
1040 delete strsrch; in TestOverlap()
1056 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestCollator() local
1060 delete strsrch; in TestCollator()
1063 if (!assertEqualWithStringSearch(strsrch, &COLLATOR[0])) { in TestCollator()
1064 delete strsrch; in TestCollator()
1076 delete strsrch; in TestCollator()
1081 strsrch->setCollator(tailored, status); in TestCollator()
1082 if (U_FAILURE(status) || (*strsrch->getCollator()) != (*tailored)) { in TestCollator()
1084 delete strsrch; in TestCollator()
1087 strsrch->reset(); in TestCollator()
1088 if (!assertEqualWithStringSearch(strsrch, &COLLATOR[1])) { in TestCollator()
1089 delete strsrch; in TestCollator()
1094 strsrch->setCollator(m_en_us_, status); in TestCollator()
1095 strsrch->reset(); in TestCollator()
1096 if (U_FAILURE(status) || (*strsrch->getCollator()) != (*m_en_us_)) { in TestCollator()
1098 delete strsrch; in TestCollator()
1101 if (!assertEqualWithStringSearch(strsrch, &COLLATOR[0])) { in TestCollator()
1104 delete strsrch; in TestCollator()
1122 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestPattern() local
1128 if (strsrch != NULL) { in TestPattern()
1129 delete strsrch; in TestPattern()
1133 if (strsrch->getPattern() != pattern) { in TestPattern()
1136 if (!assertEqualWithStringSearch(strsrch, &PATTERN[0])) { in TestPattern()
1138 if (strsrch != NULL) { in TestPattern()
1139 delete strsrch; in TestPattern()
1146 strsrch->setPattern(pattern, status); in TestPattern()
1147 if (pattern != strsrch->getPattern()) { in TestPattern()
1150 if (strsrch != NULL) { in TestPattern()
1151 delete strsrch; in TestPattern()
1155 strsrch->reset(); in TestPattern()
1159 if (!assertEqualWithStringSearch(strsrch, &PATTERN[1])) { in TestPattern()
1161 if (strsrch != NULL) { in TestPattern()
1162 delete strsrch; in TestPattern()
1169 strsrch->setPattern(pattern, status); in TestPattern()
1170 if (pattern != strsrch->getPattern()) { in TestPattern()
1173 if (strsrch != NULL) { in TestPattern()
1174 delete strsrch; in TestPattern()
1178 strsrch->reset(); in TestPattern()
1182 if (!assertEqualWithStringSearch(strsrch, &PATTERN[0])) { in TestPattern()
1184 if (strsrch != NULL) { in TestPattern()
1185 delete strsrch; in TestPattern()
1195 strsrch->setPattern(pattern, status); in TestPattern()
1200 if (strsrch != NULL) { in TestPattern()
1201 delete strsrch; in TestPattern()
1216 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestText() local
1222 if (text != strsrch->getText()) { in TestText()
1225 if (!assertEqualWithStringSearch(strsrch, &TEXT[0])) { in TestText()
1226 delete strsrch; in TestText()
1232 strsrch->setText(text, status); in TestText()
1233 if (text != strsrch->getText()) { in TestText()
1235 delete strsrch; in TestText()
1241 if (!assertEqualWithStringSearch(strsrch, &TEXT[1])) { in TestText()
1242 delete strsrch; in TestText()
1249 strsrch->setText(chariter, status); in TestText()
1250 if (text != strsrch->getText()) { in TestText()
1252 delete strsrch; in TestText()
1258 if (!assertEqualWithStringSearch(strsrch, &TEXT[0])) { in TestText()
1261 delete strsrch; in TestText()
1281 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, in TestGetSetOffset() local
1284 strsrch->setOffset(-1, status); in TestGetSetOffset()
1288 strsrch->setOffset(128, status); in TestGetSetOffset()
1302 strsrch->setText(text, status); in TestGetSetOffset()
1303 strsrch->setPattern(pattern, status); in TestGetSetOffset()
1304 strsrch->getCollator()->setStrength(getECollationStrength( in TestGetSetOffset()
1306 strsrch->reset(); in TestGetSetOffset()
1312 strsrch->next(status); in TestGetSetOffset()
1313 if (matchindex != strsrch->getMatchedStart() || in TestGetSetOffset()
1314 matchlength != strsrch->getMatchedLength()) { in TestGetSetOffset()
1315 char *str = toCharString(strsrch->getText()); in TestGetSetOffset()
1317 str = toCharString(strsrch->getPattern()); in TestGetSetOffset()
1320 strsrch->getMatchedStart(), in TestGetSetOffset()
1321 strsrch->getMatchedLength()); in TestGetSetOffset()
1327 strsrch->setOffset(search.offset[count + 1] + 1, status); in TestGetSetOffset()
1328 if (strsrch->getOffset() != search.offset[count + 1] + 1) { in TestGetSetOffset()
1336 strsrch->next(status); in TestGetSetOffset()
1337 if (strsrch->getMatchedStart() != USEARCH_DONE) { in TestGetSetOffset()
1338 char *str = toCharString(strsrch->getText()); in TestGetSetOffset()
1340 str = toCharString(strsrch->getPattern()); in TestGetSetOffset()
1343 strsrch->getMatchedStart(), in TestGetSetOffset()
1344 strsrch->getMatchedLength()); in TestGetSetOffset()
1348 strsrch->getCollator()->setStrength(getECollationStrength( in TestGetSetOffset()
1350 delete strsrch; in TestGetSetOffset()
1358 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestGetSetAttribute() local
1365 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_DEFAULT, status); in TestGetSetAttribute()
1367 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) { in TestGetSetAttribute()
1370 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status); in TestGetSetAttribute()
1372 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) { in TestGetSetAttribute()
1375 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status); in TestGetSetAttribute()
1377 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) { in TestGetSetAttribute()
1380 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ATTRIBUTE_VALUE_COUNT, in TestGetSetAttribute()
1386 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_DEFAULT, status); in TestGetSetAttribute()
1388 strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF) { in TestGetSetAttribute()
1391 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestGetSetAttribute()
1393 strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_ON) { in TestGetSetAttribute()
1396 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_OFF, status); in TestGetSetAttribute()
1398 strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF) { in TestGetSetAttribute()
1401 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, in TestGetSetAttribute()
1407 strsrch->setAttribute(USEARCH_ATTRIBUTE_COUNT, USEARCH_DEFAULT, status); in TestGetSetAttribute()
1412 delete strsrch; in TestGetSetAttribute()
1427 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestGetMatch() local
1431 if (strsrch != NULL) { in TestGetMatch()
1432 delete strsrch; in TestGetMatch()
1442 strsrch->next(status); in TestGetMatch()
1443 if (matchindex != strsrch->getMatchedStart() || in TestGetMatch()
1444 matchlength != strsrch->getMatchedLength()) { in TestGetMatch()
1445 char *str = toCharString(strsrch->getText()); in TestGetMatch()
1447 str = toCharString(strsrch->getPattern()); in TestGetMatch()
1449 errln("Error match found at %d %d", strsrch->getMatchedStart(), in TestGetMatch()
1450 strsrch->getMatchedLength()); in TestGetMatch()
1456 strsrch->getMatchedText(matchtext); in TestGetMatch()
1463 strsrch->next(status); in TestGetMatch()
1464 if (strsrch->getMatchedStart() != USEARCH_DONE || in TestGetMatch()
1465 strsrch->getMatchedLength() != 0) { in TestGetMatch()
1469 strsrch->getMatchedText(matchtext); in TestGetMatch()
1473 delete strsrch; in TestGetMatch()
1490 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, in TestSetMatch() local
1494 if (strsrch != NULL) { in TestSetMatch()
1495 delete strsrch; in TestSetMatch()
1505 if (strsrch->first(status) != search.offset[0] || U_FAILURE(status)) { in TestSetMatch()
1508 if (strsrch->last(status) != search.offset[size -1] || in TestSetMatch()
1516 if (strsrch->following(search.offset[index + 2] - 1, status) in TestSetMatch()
1523 if (strsrch->preceding(search.offset[index + 1] + in TestSetMatch()
1534 if (strsrch->following(text.length(), status) != USEARCH_DONE) { in TestSetMatch()
1537 if (strsrch->preceding(0, status) != USEARCH_DONE) { in TestSetMatch()
1541 delete strsrch; in TestSetMatch()
1550 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestReset() local
1554 if (strsrch != NULL) { in TestReset()
1555 delete strsrch; in TestReset()
1559 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status); in TestReset()
1560 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestReset()
1561 strsrch->setOffset(9, status); in TestReset()
1566 strsrch->reset(); in TestReset()
1567 if (strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF || in TestReset()
1568 strsrch->getAttribute(USEARCH_CANONICAL_MATCH) != USEARCH_OFF || in TestReset()
1569 strsrch->getOffset() != 0 || strsrch->getMatchedLength() != 0 || in TestReset()
1570 strsrch->getMatchedStart() != USEARCH_DONE) { in TestReset()
1573 strsrch->previous(status); in TestReset()
1574 if (strsrch->getMatchedStart() != 7 || in TestReset()
1575 strsrch->getMatchedLength() != 1) { in TestReset()
1579 delete strsrch; in TestReset()
1608 StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL, in TestContraction() local
1620 strsrch->setText(text, status); in TestContraction()
1621 strsrch->setPattern(pattern, status); in TestContraction()
1622 if (!assertEqualWithStringSearch(strsrch, &CONTRACTION[count])) { in TestContraction()
1627 delete strsrch; in TestContraction()
1648 StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL, in TestIgnorable() local
1661 strsrch->setText(text, status); in TestIgnorable()
1662 strsrch->setPattern(pattern, status); in TestIgnorable()
1663 if (!assertEqualWithStringSearch(strsrch, &IGNORABLE[count])) { in TestIgnorable()
1668 delete strsrch; in TestIgnorable()
1678 StringSearch *strsrch = NULL; in TestDiacriticMatch() local
1689 strsrch = new StringSearch(pattern, text, coll, getBreakIterator(search->breaker), status); in TestDiacriticMatch()
1698 strsrch->setText(text, status); in TestDiacriticMatch()
1699 strsrch->setPattern(pattern, status); in TestDiacriticMatch()
1700 if (!assertEqualWithStringSearch(strsrch, search)) { in TestDiacriticMatch()
1704 delete strsrch; in TestDiacriticMatch()
1767 StringSearch *strsrch = new StringSearch(pattern, text, collator, in TestBreakIteratorCanonical() local
1773 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestBreakIteratorCanonical()
1775 strsrch->getBreakIterator() != breaker) { in TestBreakIteratorCanonical()
1777 delete strsrch; in TestBreakIteratorCanonical()
1780 if (!assertEqualWithStringSearch(strsrch, search)) { in TestBreakIteratorCanonical()
1782 delete strsrch; in TestBreakIteratorCanonical()
1791 breaker->setText(strsrch->getText()); in TestBreakIteratorCanonical()
1792 strsrch->setBreakIterator(breaker, status); in TestBreakIteratorCanonical()
1793 if (U_FAILURE(status) || strsrch->getBreakIterator() != breaker) { in TestBreakIteratorCanonical()
1795 delete strsrch; in TestBreakIteratorCanonical()
1798 strsrch->reset(); in TestBreakIteratorCanonical()
1799 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestBreakIteratorCanonical()
1800 if (!assertEqualWithStringSearch(strsrch, search)) { in TestBreakIteratorCanonical()
1804 delete strsrch; in TestBreakIteratorCanonical()
1870 StringSearch *strsrch = new StringSearch(pattern, text, collator, in TestOverlapCanonical() local
1872 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestOverlapCanonical()
1873 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status); in TestOverlapCanonical()
1875 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_ON) { in TestOverlapCanonical()
1878 if (!assertEqualWithStringSearch(strsrch, search)) { in TestOverlapCanonical()
1879 delete strsrch; in TestOverlapCanonical()
1883 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status); in TestOverlapCanonical()
1885 strsrch->getAttribute(USEARCH_OVERLAP) != USEARCH_OFF) { in TestOverlapCanonical()
1888 strsrch->reset(); in TestOverlapCanonical()
1889 if (!assertEqualWithStringSearch(strsrch, search)) { in TestOverlapCanonical()
1890 delete strsrch; in TestOverlapCanonical()
1895 delete strsrch; in TestOverlapCanonical()
1911 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, in TestCollatorCanonical() local
1913 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestCollatorCanonical()
1917 if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[0])) { in TestCollatorCanonical()
1918 delete strsrch; in TestCollatorCanonical()
1933 strsrch->setCollator(tailored, status); in TestCollatorCanonical()
1934 if (U_FAILURE(status) || *(strsrch->getCollator()) != *tailored) { in TestCollatorCanonical()
1937 strsrch->reset(); in TestCollatorCanonical()
1938 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestCollatorCanonical()
1939 if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[1])) { in TestCollatorCanonical()
1940 delete strsrch; in TestCollatorCanonical()
1948 strsrch->setCollator(m_en_us_, status); in TestCollatorCanonical()
1949 strsrch->reset(); in TestCollatorCanonical()
1950 if (U_FAILURE(status) || *(strsrch->getCollator()) != *m_en_us_) { in TestCollatorCanonical()
1953 if (!assertEqualWithStringSearch(strsrch, &COLLATORCANONICAL[0])) { in TestCollatorCanonical()
1955 delete strsrch; in TestCollatorCanonical()
1977 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestPatternCanonical() local
1979 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestPatternCanonical()
1984 if (pattern != strsrch->getPattern()) { in TestPatternCanonical()
1987 if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[0])) { in TestPatternCanonical()
1993 strsrch->setPattern(pattern, status); in TestPatternCanonical()
1994 if (pattern != strsrch->getPattern()) { in TestPatternCanonical()
1998 strsrch->reset(); in TestPatternCanonical()
1999 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestPatternCanonical()
2003 if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[1])) { in TestPatternCanonical()
2009 strsrch->setPattern(pattern, status); in TestPatternCanonical()
2010 if (pattern != strsrch->getPattern()) { in TestPatternCanonical()
2014 strsrch->reset(); in TestPatternCanonical()
2015 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestPatternCanonical()
2019 if (!assertEqualWithStringSearch(strsrch, &PATTERNCANONICAL[0])) { in TestPatternCanonical()
2024 if (strsrch != NULL) { in TestPatternCanonical()
2025 delete strsrch; in TestPatternCanonical()
2040 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestTextCanonical() local
2042 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestTextCanonical()
2048 if (text != strsrch->getText()) { in TestTextCanonical()
2051 if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[0])) { in TestTextCanonical()
2057 strsrch->setText(text, status); in TestTextCanonical()
2058 if (text != strsrch->getText()) { in TestTextCanonical()
2065 if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[1])) { in TestTextCanonical()
2071 strsrch->setText(text, status); in TestTextCanonical()
2072 if (text != strsrch->getText()) { in TestTextCanonical()
2079 if (!assertEqualWithStringSearch(strsrch, &TEXTCANONICAL[0])) { in TestTextCanonical()
2083 if (strsrch != NULL) { in TestTextCanonical()
2084 delete strsrch; in TestTextCanonical()
2106 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestGetSetOffsetCanonical() local
2108 Collator *collator = strsrch->getCollator(); in TestGetSetOffsetCanonical()
2112 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestGetSetOffsetCanonical()
2114 strsrch->setOffset(-1, status); in TestGetSetOffsetCanonical()
2118 strsrch->setOffset(128, status); in TestGetSetOffsetCanonical()
2137 strsrch->setText(text, status); in TestGetSetOffsetCanonical()
2139 strsrch->setPattern(pattern, status); in TestGetSetOffsetCanonical()
2145 strsrch->next(status); in TestGetSetOffsetCanonical()
2146 if (matchindex != strsrch->getMatchedStart() || in TestGetSetOffsetCanonical()
2147 matchlength != strsrch->getMatchedLength()) { in TestGetSetOffsetCanonical()
2148 char *str = toCharString(strsrch->getText()); in TestGetSetOffsetCanonical()
2150 str = toCharString(strsrch->getPattern()); in TestGetSetOffsetCanonical()
2153 strsrch->getMatchedStart(), in TestGetSetOffsetCanonical()
2154 strsrch->getMatchedLength()); in TestGetSetOffsetCanonical()
2160 strsrch->setOffset(search.offset[count + 1] + 1, status); in TestGetSetOffsetCanonical()
2161 if (strsrch->getOffset() != search.offset[count + 1] + 1) { in TestGetSetOffsetCanonical()
2169 strsrch->next(status); in TestGetSetOffsetCanonical()
2170 if (strsrch->getMatchedStart() != USEARCH_DONE) { in TestGetSetOffsetCanonical()
2171 char *str = toCharString(strsrch->getText()); in TestGetSetOffsetCanonical()
2173 str = toCharString(strsrch->getPattern()); in TestGetSetOffsetCanonical()
2175 errln("Error match found at %d %d", strsrch->getMatchedStart(), in TestGetSetOffsetCanonical()
2176 strsrch->getMatchedLength()); in TestGetSetOffsetCanonical()
2183 delete strsrch; in TestGetSetOffsetCanonical()
2213 StringSearch *strsrch = new StringSearch(pattern, text, collator, NULL, in TestContractionCanonical() local
2215 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status); in TestContractionCanonical()
2226 strsrch->setText(text, status); in TestContractionCanonical()
2227 strsrch->setPattern(pattern, status); in TestContractionCanonical()
2228 if (!assertEqualWithStringSearch(strsrch, in TestContractionCanonical()
2234 delete strsrch; in TestContractionCanonical()
2247 StringSearch *strsrch = new StringSearch(pattern, text, m_en_us_, NULL, in TestUClassID() local
2249 id = *((char *)strsrch->getDynamicClassID()); in TestUClassID()
2253 delete strsrch; in TestUClassID()