• Home
  • Raw
  • Download

Lines Matching refs:status

53 static void open(UErrorCode* status)  in open()  argument
58 *status = U_ZERO_ERROR; in open()
60 EN_US_ = ucol_open("en_US", status); in open()
61 if(U_FAILURE(*status)) { in open()
62 log_err_status(*status, "Error opening collator\n"); in open()
65 FR_FR_ = ucol_open("fr_FR", status); in open()
66 DE_ = ucol_open("de_DE", status); in open()
67 ES_ = ucol_open("es_ES", status); in open()
75 (UParseError *)NULL, status); in open()
81 NULL, status); in open()
83 EN_WORDBREAKER_ = ubrk_open(UBRK_WORD, "en_US", NULL, 0, status); in open()
85 status); in open()
96 UErrorCode status = U_ZERO_ERROR; in TestStart() local
97 open(&status); in TestStart()
98 if (U_FAILURE(status)) { in TestStart()
99 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestStart()
202 UErrorCode status = U_ZERO_ERROR; in TestOpenClose() local
208 text, 6, &status); in TestOpenClose()
211 result = usearch_open(NULL, 0, NULL, 0, NULL, NULL, &status); in TestOpenClose()
212 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
215 status = U_ZERO_ERROR; in TestOpenClose()
216 result = usearch_openFromCollator(NULL, 0, NULL, 0, NULL, NULL, &status); in TestOpenClose()
217 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
221 status = U_ZERO_ERROR; in TestOpenClose()
222 result = usearch_open(pattern, 3, NULL, 0, NULL, NULL, &status); in TestOpenClose()
223 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
226 status = U_ZERO_ERROR; in TestOpenClose()
228 &status); in TestOpenClose()
229 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
233 status = U_ZERO_ERROR; in TestOpenClose()
234 result = usearch_open(pattern, 3, text, 6, NULL, NULL, &status); in TestOpenClose()
235 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
238 status = U_ZERO_ERROR; in TestOpenClose()
240 &status); in TestOpenClose()
241 if (U_SUCCESS(status) || result != NULL) { in TestOpenClose()
245 status = U_ZERO_ERROR; in TestOpenClose()
246 result = usearch_open(pattern, 3, text, 6, "en_US", NULL, &status); in TestOpenClose()
247 if (U_FAILURE(status) || result == NULL) { in TestOpenClose()
248 log_err_status(status, "Error: NULL break iterator is valid for opening search\n"); in TestOpenClose()
253 open(&status); in TestOpenClose()
254 if (U_FAILURE(status)) { in TestOpenClose()
255 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestOpenClose()
258 status = U_ZERO_ERROR; in TestOpenClose()
260 &status); in TestOpenClose()
261 if (U_FAILURE(status) || result == NULL) { in TestOpenClose()
273 status = U_ZERO_ERROR; in TestOpenClose()
276 result = usearch_open(pattern, 3, text, 6, "en_US", breakiter, &status); in TestOpenClose()
277 if (U_FAILURE(status) || result == NULL) { in TestOpenClose()
278 log_err_status(status, "Error: Break iterator is valid for opening search\n"); in TestOpenClose()
283 status = U_ZERO_ERROR; in TestOpenClose()
285 &status); in TestOpenClose()
286 if (U_FAILURE(status) || result == NULL) { in TestOpenClose()
303 UErrorCode status = U_ZERO_ERROR; in TestInitialization() local
312 open(&status); in TestInitialization()
313 if (U_FAILURE(status)) { in TestInitialization()
314 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestInitialization()
318 &status); in TestInitialization()
319 if (U_FAILURE(status)) { in TestInitialization()
320 log_err("Error opening search %s\n", u_errorName(status)); in TestInitialization()
330 &status); in TestInitialization()
331 if (U_FAILURE(status)) { in TestInitialization()
332 log_err("Error opening search %s\n", u_errorName(status)); in TestInitialization()
342 UErrorCode status = U_ZERO_ERROR; in assertEqualWithUStringSearch() local
350 usearch_setAttribute(strsrch, USEARCH_ELEMENT_COMPARISON, search.elemCompare, &status); in assertEqualWithUStringSearch()
351 if (U_FAILURE(status)) { in assertEqualWithUStringSearch()
352 log_err("Error setting USEARCH_ELEMENT_COMPARISON attribute %s\n", u_errorName(status)); in assertEqualWithUStringSearch()
361 while (U_SUCCESS(status) && matchindex >= 0) { in assertEqualWithUStringSearch()
363 usearch_next(strsrch, &status); in assertEqualWithUStringSearch()
377 if (usearch_getMatchedText(strsrch, matchtext, 128, &status) != in assertEqualWithUStringSearch()
378 (int32_t) matchlength || U_FAILURE(status) || in assertEqualWithUStringSearch()
387 usearch_next(strsrch, &status); in assertEqualWithUStringSearch()
403 while (U_SUCCESS(status) && matchindex >= 0) { in assertEqualWithUStringSearch()
405 usearch_previous(strsrch, &status); in assertEqualWithUStringSearch()
418 if (usearch_getMatchedText(strsrch, matchtext, 128, &status) != in assertEqualWithUStringSearch()
419 (int32_t) matchlength || U_FAILURE(status) || in assertEqualWithUStringSearch()
429 usearch_previous(strsrch, &status); in assertEqualWithUStringSearch()
451 usearch_following(strsrch, nextStart, &status); in assertEqualWithUStringSearch()
472 || U_FAILURE(status)) { in assertEqualWithUStringSearch()
502 usearch_preceding(strsrch, nextStart, &status); in assertEqualWithUStringSearch()
524 || U_FAILURE(status)) { in assertEqualWithUStringSearch()
540 …ch_setAttribute(strsrch, USEARCH_ELEMENT_COMPARISON, USEARCH_STANDARD_ELEMENT_COMPARISON, &status); in assertEqualWithUStringSearch()
546 UErrorCode status = U_ZERO_ERROR; in assertEqual() local
559 breaker, &status); in assertEqual()
560 if (U_FAILURE(status)) { in assertEqual()
561 log_err("Error opening string search %s\n", u_errorName(status)); in assertEqual()
577 UErrorCode status = U_ZERO_ERROR; in assertCanonicalEqual() local
589 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in assertCanonicalEqual()
591 breaker, &status); in assertCanonicalEqual()
593 &status); in assertCanonicalEqual()
594 if (U_FAILURE(status)) { in assertCanonicalEqual()
595 log_err("Error opening string search %s\n", u_errorName(status)); in assertCanonicalEqual()
608 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in assertCanonicalEqual()
618 UErrorCode status = U_ZERO_ERROR; in assertEqualWithAttribute() local
630 breaker, &status); in assertEqualWithAttribute()
632 &status); in assertEqualWithAttribute()
633 usearch_setAttribute(strsrch, USEARCH_OVERLAP, overlap, &status); in assertEqualWithAttribute()
635 if (U_FAILURE(status)) { in assertEqualWithAttribute()
636 log_err("Error opening string search %s\n", u_errorName(status)); in assertEqualWithAttribute()
653 UErrorCode status = U_ZERO_ERROR; in TestBasic() local
654 open(&status); in TestBasic()
655 if (U_FAILURE(status)) { in TestBasic()
656 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestBasic()
671 UErrorCode status = U_ZERO_ERROR; in TestNormExact() local
672 open(&status); in TestNormExact()
673 if (U_FAILURE(status)) { in TestNormExact()
674 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestNormExact()
677 ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestNormExact()
678 if (U_FAILURE(status)) { in TestNormExact()
680 u_errorName(status)); in TestNormExact()
695 ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in TestNormExact()
709 UErrorCode status = U_ZERO_ERROR; in TestStrength() local
710 open(&status); in TestStrength()
711 if (U_FAILURE(status)) { in TestStrength()
712 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestStrength()
725 UErrorCode status = U_ZERO_ERROR; in TestBreakIterator() local
734 open(&status); in TestBreakIterator()
735 if (U_FAILURE(status)) { in TestBreakIterator()
736 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestBreakIterator()
745 &status); in TestBreakIterator()
746 if (U_FAILURE(status)) { in TestBreakIterator()
747 log_err("Error opening string search %s\n", u_errorName(status)); in TestBreakIterator()
751 usearch_setBreakIterator(strsrch, NULL, &status); in TestBreakIterator()
752 if (U_FAILURE(status) || usearch_getBreakIterator(strsrch) != NULL) { in TestBreakIterator()
757 usearch_setBreakIterator(strsrch, EN_CHARACTERBREAKER_, &status); in TestBreakIterator()
758 if (U_FAILURE(status) || in TestBreakIterator()
764 usearch_setBreakIterator(strsrch, EN_WORDBREAKER_, &status); in TestBreakIterator()
765 if (U_FAILURE(status) || in TestBreakIterator()
785 breaker, &status); in TestBreakIterator()
786 if (U_FAILURE(status) || in TestBreakIterator()
800 usearch_setBreakIterator(strsrch, breaker, &status); in TestBreakIterator()
801 if (U_FAILURE(status) || usearch_getBreakIterator(strsrch) != breaker) { in TestBreakIterator()
832 UErrorCode status = U_ZERO_ERROR; in TestVariable() local
833 open(&status); in TestVariable()
834 if (U_FAILURE(status)) { in TestVariable()
835 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestVariable()
838 ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status); in TestVariable()
839 if (U_FAILURE(status)) { in TestVariable()
841 u_errorName(status)); in TestVariable()
851 UCOL_NON_IGNORABLE, &status); in TestVariable()
858 UErrorCode status = U_ZERO_ERROR; in TestOverlap() local
859 open(&status); in TestOverlap()
860 if (U_FAILURE(status)) { in TestOverlap()
861 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestOverlap()
886 status = U_ZERO_ERROR; in TestOverlap()
891 NULL, &status); in TestOverlap()
892 if(status == U_FILE_ACCESS_ERROR) { in TestOverlap()
895 } else if(U_FAILURE(status)) { in TestOverlap()
899 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status); in TestOverlap()
900 if (U_FAILURE(status) || in TestOverlap()
909 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status); in TestOverlap()
910 if (U_FAILURE(status) || in TestOverlap()
931 UErrorCode status = U_ZERO_ERROR; in TestCollator() local
943 strsrch = usearch_open(pattern, 2, text, 5, "en_US", NULL, &status); in TestCollator()
944 if(status == U_FILE_ACCESS_ERROR) { in TestCollator()
947 } else if(U_FAILURE(status)) { in TestCollator()
952 if (usearch_next(strsrch, &status) != -1) { in TestCollator()
957 if (usearch_next(strsrch, &status) != 1) { in TestCollator()
962 open(&status); in TestCollator()
971 NULL, &status); in TestCollator()
972 if (U_FAILURE(status)) { in TestCollator()
973 log_err("Error opening string search %s\n", u_errorName(status)); in TestCollator()
981 NULL, &status); in TestCollator()
982 if (U_FAILURE(status)) { in TestCollator()
983 log_err("Error opening rule based collator %s\n", u_errorName(status)); in TestCollator()
986 usearch_setCollator(strsrch, tailored, &status); in TestCollator()
987 if (U_FAILURE(status) || usearch_getCollator(strsrch) != tailored) { in TestCollator()
995 usearch_setCollator(strsrch, EN_US_, &status); in TestCollator()
997 if (U_FAILURE(status) || usearch_getCollator(strsrch) != EN_US_) { in TestCollator()
1020 UErrorCode status = U_ZERO_ERROR; in TestPattern() local
1022 open(&status); in TestPattern()
1023 if (U_FAILURE(status)) { in TestPattern()
1024 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestPattern()
1030 usearch_setPattern(NULL, pattern, 3, &status); in TestPattern()
1031 if (U_SUCCESS(status)) { in TestPattern()
1034 status = U_ZERO_ERROR; in TestPattern()
1040 NULL, &status); in TestPattern()
1041 if(status == U_FILE_ACCESS_ERROR) { in TestPattern()
1044 } else if(U_FAILURE(status)) { in TestPattern()
1049 status = U_ZERO_ERROR; in TestPattern()
1050 usearch_setPattern(strsrch, NULL, 3, &status); in TestPattern()
1051 if (U_SUCCESS(status)) { in TestPattern()
1054 status = U_ZERO_ERROR; in TestPattern()
1055 usearch_setPattern(strsrch, pattern, 0, &status); in TestPattern()
1056 if (U_SUCCESS(status)) { in TestPattern()
1059 status = U_ZERO_ERROR; in TestPattern()
1060 if (U_FAILURE(status)) { in TestPattern()
1061 log_err("Error opening string search %s\n", u_errorName(status)); in TestPattern()
1073 usearch_setPattern(strsrch, pattern, -1, &status); in TestPattern()
1080 if (U_FAILURE(status)) { in TestPattern()
1081 log_err("Error setting pattern %s\n", u_errorName(status)); in TestPattern()
1088 usearch_setPattern(strsrch, pattern, -1, &status); in TestPattern()
1095 if (U_FAILURE(status)) { in TestPattern()
1096 log_err("Error setting pattern %s\n", u_errorName(status)); in TestPattern()
1106 usearch_setPattern(strsrch, bigpattern, -1, &status); in TestPattern()
1107 if (U_FAILURE(status)) { in TestPattern()
1109 u_errorName(status)); in TestPattern()
1126 UErrorCode status = U_ZERO_ERROR; in TestText() local
1131 open(&status); in TestText()
1132 if (U_FAILURE(status)) { in TestText()
1133 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestText()
1141 usearch_setText(NULL, text, 10, &status); in TestText()
1142 if (U_SUCCESS(status)) { in TestText()
1146 status = U_ZERO_ERROR; in TestText()
1148 NULL, &status); in TestText()
1150 if (U_FAILURE(status)) { in TestText()
1151 log_err("Error opening string search %s\n", u_errorName(status)); in TestText()
1163 usearch_setText(strsrch, text, -1, &status); in TestText()
1169 if (U_FAILURE(status)) { in TestText()
1170 log_err("Error setting text %s\n", u_errorName(status)); in TestText()
1177 usearch_setText(strsrch, text, -1, &status); in TestText()
1183 if (U_FAILURE(status)) { in TestText()
1184 log_err("Error setting pattern %s\n", u_errorName(status)); in TestText()
1199 UErrorCode status = U_ZERO_ERROR; in TestCompositeBoundaries() local
1200 open(&status); in TestCompositeBoundaries()
1201 if (U_FAILURE(status)) { in TestCompositeBoundaries()
1202 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestCompositeBoundaries()
1220 UErrorCode status = U_ZERO_ERROR; in TestGetSetOffset() local
1225 open(&status); in TestGetSetOffset()
1226 if (U_FAILURE(status)) { in TestGetSetOffset()
1227 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestGetSetOffset()
1234 &status); in TestGetSetOffset()
1236 usearch_setOffset(strsrch, -1, &status); in TestGetSetOffset()
1237 if (U_SUCCESS(status)) { in TestGetSetOffset()
1240 usearch_setOffset(strsrch, 128, &status); in TestGetSetOffset()
1241 if (U_SUCCESS(status)) { in TestGetSetOffset()
1252 status = U_ZERO_ERROR; in TestGetSetOffset()
1253 usearch_setText(strsrch, text, -1, &status); in TestGetSetOffset()
1254 usearch_setPattern(strsrch, pattern, -1, &status); in TestGetSetOffset()
1257 while (U_SUCCESS(status) && matchindex >= 0) { in TestGetSetOffset()
1259 usearch_next(strsrch, &status); in TestGetSetOffset()
1272 usearch_setOffset(strsrch, matchindex + matchlength, &status); in TestGetSetOffset()
1273 usearch_previous(strsrch, &status); in TestGetSetOffset()
1286 usearch_setOffset(strsrch, matchindex + matchlength, &status); in TestGetSetOffset()
1291 &status); in TestGetSetOffset()
1300 usearch_next(strsrch, &status); in TestGetSetOffset()
1319 UErrorCode status = U_ZERO_ERROR; in TestGetSetAttribute() local
1327 open(&status); in TestGetSetAttribute()
1328 if (U_FAILURE(status)) { in TestGetSetAttribute()
1329 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestGetSetAttribute()
1339 &status); in TestGetSetAttribute()
1340 if (U_FAILURE(status)) { in TestGetSetAttribute()
1341 log_err("Error opening search %s\n", u_errorName(status)); in TestGetSetAttribute()
1345 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_DEFAULT, &status); in TestGetSetAttribute()
1346 if (U_FAILURE(status) || in TestGetSetAttribute()
1350 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status); in TestGetSetAttribute()
1351 if (U_FAILURE(status) || in TestGetSetAttribute()
1355 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status); in TestGetSetAttribute()
1356 if (U_FAILURE(status) || in TestGetSetAttribute()
1361 USEARCH_ATTRIBUTE_VALUE_COUNT, &status); in TestGetSetAttribute()
1362 if (U_SUCCESS(status)) { in TestGetSetAttribute()
1365 status = U_ZERO_ERROR; in TestGetSetAttribute()
1367 &status); in TestGetSetAttribute()
1368 if (U_FAILURE(status) || in TestGetSetAttribute()
1374 &status); in TestGetSetAttribute()
1375 if (U_FAILURE(status) || in TestGetSetAttribute()
1381 &status); in TestGetSetAttribute()
1382 if (U_FAILURE(status) || in TestGetSetAttribute()
1388 USEARCH_ATTRIBUTE_VALUE_COUNT, &status); in TestGetSetAttribute()
1389 if (U_SUCCESS(status)) { in TestGetSetAttribute()
1392 status = U_ZERO_ERROR; in TestGetSetAttribute()
1394 &status); in TestGetSetAttribute()
1395 if (U_SUCCESS(status)) { in TestGetSetAttribute()
1406 UErrorCode status = U_ZERO_ERROR; in TestGetMatch() local
1415 open(&status); in TestGetMatch()
1416 if (U_FAILURE(status)) { in TestGetMatch()
1417 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestGetMatch()
1430 NULL, &status); in TestGetMatch()
1431 if (U_FAILURE(status)) { in TestGetMatch()
1432 log_err("Error opening string search %s\n", u_errorName(status)); in TestGetMatch()
1439 while (U_SUCCESS(status) && matchindex >= 0) { in TestGetMatch()
1441 usearch_next(strsrch, &status); in TestGetMatch()
1455 status = U_ZERO_ERROR; in TestGetMatch()
1456 if (usearch_getMatchedText(NULL, matchtext, 128, &status) != in TestGetMatch()
1457 USEARCH_DONE || U_SUCCESS(status)){ in TestGetMatch()
1460 status = U_ZERO_ERROR; in TestGetMatch()
1461 if (usearch_getMatchedText(strsrch, NULL, 0, &status) != in TestGetMatch()
1462 (int32_t)matchlength || U_SUCCESS(status)){ in TestGetMatch()
1465 status = U_ZERO_ERROR; in TestGetMatch()
1466 if (usearch_getMatchedText(strsrch, matchtext, 0, &status) != in TestGetMatch()
1467 (int32_t)matchlength || U_SUCCESS(status)){ in TestGetMatch()
1470 status = U_ZERO_ERROR; in TestGetMatch()
1471 if (usearch_getMatchedText(strsrch, matchtext, matchlength, &status) in TestGetMatch()
1473 U_FAILURE(status)){ in TestGetMatch()
1476 status = U_ZERO_ERROR; in TestGetMatch()
1477 if (usearch_getMatchedText(strsrch, matchtext, 128, &status) != in TestGetMatch()
1478 (int32_t) matchlength || U_FAILURE(status) || in TestGetMatch()
1488 status = U_ZERO_ERROR; in TestGetMatch()
1489 usearch_next(strsrch, &status); in TestGetMatch()
1494 status = U_ZERO_ERROR; in TestGetMatch()
1495 if (usearch_getMatchedText(strsrch, matchtext, 128, &status) != in TestGetMatch()
1506 UErrorCode status = U_ZERO_ERROR; in TestSetMatch() local
1507 open(&status); in TestSetMatch()
1508 if (U_FAILURE(status)) { in TestSetMatch()
1509 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestSetMatch()
1519 status = U_ZERO_ERROR; in TestSetMatch()
1521 if (usearch_first(NULL, &status) != USEARCH_DONE || in TestSetMatch()
1522 usearch_last(NULL, &status) != USEARCH_DONE) { in TestSetMatch()
1528 NULL, &status); in TestSetMatch()
1529 if (U_FAILURE(status)) { in TestSetMatch()
1530 log_err("Error opening string search %s\n", u_errorName(status)); in TestSetMatch()
1542 if (usearch_first(strsrch, &status) != search.offset[0] || in TestSetMatch()
1543 U_FAILURE(status)) { in TestSetMatch()
1546 if (usearch_last(strsrch, &status) != search.offset[size -1] || in TestSetMatch()
1547 U_FAILURE(status)) { in TestSetMatch()
1554 &status) != search.offset[offsetIndex + 2] || in TestSetMatch()
1555 U_FAILURE(status)) { in TestSetMatch()
1563 &status) != search.offset[offsetIndex + 1] || in TestSetMatch()
1564 U_FAILURE(status)) { in TestSetMatch()
1571 status = U_ZERO_ERROR; in TestSetMatch()
1572 if (usearch_following(strsrch, u_strlen(text), &status) != in TestSetMatch()
1576 if (usearch_preceding(strsrch, 0, &status) != USEARCH_DONE) { in TestSetMatch()
1587 UErrorCode status = U_ZERO_ERROR; in TestReset() local
1593 open(&status); in TestReset()
1594 if (U_FAILURE(status)) { in TestReset()
1595 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestReset()
1599 EN_US_, NULL, &status); in TestReset()
1600 if (U_FAILURE(status)) { in TestReset()
1601 log_err("Error opening string search %s\n", u_errorName(status)); in TestReset()
1607 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status); in TestReset()
1609 &status); in TestReset()
1610 usearch_setOffset(strsrch, 9, &status); in TestReset()
1611 if (U_FAILURE(status)) { in TestReset()
1624 usearch_previous(strsrch, &status); in TestReset()
1637 UErrorCode status = U_ZERO_ERROR; in TestSupplementary() local
1638 open(&status); in TestSupplementary()
1639 if (U_FAILURE(status)) { in TestSupplementary()
1640 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestSupplementary()
1658 UErrorCode status = U_ZERO_ERROR; in TestContraction() local
1667 UCOL_TERTIARY, NULL, &status); in TestContraction()
1668 if(status == U_FILE_ACCESS_ERROR) { in TestContraction()
1671 } else if(U_FAILURE(status)) { in TestContraction()
1672 log_err("Error opening collator %s\n", u_errorName(status)); in TestContraction()
1676 &status); in TestContraction()
1677 if (U_FAILURE(status)) { in TestContraction()
1678 log_err("Error opening string search %s\n", u_errorName(status)); in TestContraction()
1684 usearch_setText(strsrch, text, -1, &status); in TestContraction()
1685 usearch_setPattern(strsrch, pattern, -1, &status); in TestContraction()
1701 UErrorCode status = U_ZERO_ERROR; in TestIgnorable() local
1711 IGNORABLE[count].strength, NULL, &status); in TestIgnorable()
1712 if(status == U_FILE_ACCESS_ERROR) { in TestIgnorable()
1715 } else if(U_FAILURE(status)) { in TestIgnorable()
1716 log_err("Error opening collator %s\n", u_errorName(status)); in TestIgnorable()
1720 &status); in TestIgnorable()
1721 if (U_FAILURE(status)) { in TestIgnorable()
1722 log_err("Error opening string search %s\n", u_errorName(status)); in TestIgnorable()
1728 usearch_setText(strsrch, text, -1, &status); in TestIgnorable()
1729 usearch_setPattern(strsrch, pattern, -1, &status); in TestIgnorable()
1743 UErrorCode status = U_ZERO_ERROR; in TestDiacriticMatch() local
1752 strsrch = usearch_open(pattern, 1, text, 1, uloc_getDefault(), NULL, &status); in TestDiacriticMatch()
1753 if (U_FAILURE(status)) { in TestDiacriticMatch()
1754 log_err_status(status, "Error opening string search %s\n", u_errorName(status)); in TestDiacriticMatch()
1761 coll = ucol_openFromShortString(search.collator, FALSE, NULL, &status); in TestDiacriticMatch()
1764 coll = ucol_open("en_US"/*uloc_getDefault()*/, &status); in TestDiacriticMatch()
1767 if (U_FAILURE(status)) { in TestDiacriticMatch()
1768 …log_err("Error opening string search collator(\"%s\") %s\n", search.collator, u_errorName(status)); in TestDiacriticMatch()
1772 usearch_setCollator(strsrch, coll, &status); in TestDiacriticMatch()
1773 if (U_FAILURE(status)) { in TestDiacriticMatch()
1774 log_err("Error setting string search collator %s\n", u_errorName(status)); in TestDiacriticMatch()
1780 usearch_setText(strsrch, text, -1, &status); in TestDiacriticMatch()
1781 usearch_setPattern(strsrch, pattern, -1, &status); in TestDiacriticMatch()
1795 UErrorCode status = U_ZERO_ERROR; in TestCanonical() local
1796 open(&status); in TestCanonical()
1797 if (U_FAILURE(status)) { in TestCanonical()
1798 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestCanonical()
1813 UErrorCode status = U_ZERO_ERROR; in TestNormCanonical() local
1814 open(&status); in TestNormCanonical()
1815 if (U_FAILURE(status)) { in TestNormCanonical()
1816 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestNormCanonical()
1819 ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestNormCanonical()
1827 ucol_setAttribute(EN_US_, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in TestNormCanonical()
1834 UErrorCode status = U_ZERO_ERROR; in TestStrengthCanonical() local
1835 open(&status); in TestStrengthCanonical()
1836 if (U_FAILURE(status)) { in TestStrengthCanonical()
1837 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestStrengthCanonical()
1850 UErrorCode status = U_ZERO_ERROR; in TestBreakIteratorCanonical() local
1857 open(&status); in TestBreakIteratorCanonical()
1858 if (U_FAILURE(status)) { in TestBreakIteratorCanonical()
1859 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestBreakIteratorCanonical()
1876 breaker, &status); in TestBreakIteratorCanonical()
1877 if(status == U_FILE_ACCESS_ERROR) { in TestBreakIteratorCanonical()
1880 } else if(U_FAILURE(status)) { in TestBreakIteratorCanonical()
1885 &status); in TestBreakIteratorCanonical()
1886 if (U_FAILURE(status) || in TestBreakIteratorCanonical()
1899 usearch_setBreakIterator(strsrch, breaker, &status); in TestBreakIteratorCanonical()
1900 if (U_FAILURE(status) || usearch_getBreakIterator(strsrch) != breaker) { in TestBreakIteratorCanonical()
1907 &status); in TestBreakIteratorCanonical()
1933 UErrorCode status = U_ZERO_ERROR; in TestVariableCanonical() local
1934 open(&status); in TestVariableCanonical()
1935 if (U_FAILURE(status)) { in TestVariableCanonical()
1936 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestVariableCanonical()
1939 ucol_setAttribute(EN_US_, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status); in TestVariableCanonical()
1940 if (U_FAILURE(status)) { in TestVariableCanonical()
1942 u_errorName(status)); in TestVariableCanonical()
1952 UCOL_NON_IGNORABLE, &status); in TestVariableCanonical()
1959 UErrorCode status = U_ZERO_ERROR; in TestOverlapCanonical() local
1960 open(&status); in TestOverlapCanonical()
1961 if (U_FAILURE(status)) { in TestOverlapCanonical()
1962 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestOverlapCanonical()
1987 status = U_ZERO_ERROR; in TestOverlapCanonical()
1992 NULL, &status); in TestOverlapCanonical()
1993 if(status == U_FILE_ACCESS_ERROR) { in TestOverlapCanonical()
1996 } else if(U_FAILURE(status)) { in TestOverlapCanonical()
2001 &status); in TestOverlapCanonical()
2002 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_ON, &status); in TestOverlapCanonical()
2003 if (U_FAILURE(status) || in TestOverlapCanonical()
2012 usearch_setAttribute(strsrch, USEARCH_OVERLAP, USEARCH_OFF, &status); in TestOverlapCanonical()
2013 if (U_FAILURE(status) || in TestOverlapCanonical()
2034 UErrorCode status = U_ZERO_ERROR; in TestCollatorCanonical() local
2039 open(&status); in TestCollatorCanonical()
2040 if (U_FAILURE(status)) { in TestCollatorCanonical()
2041 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestCollatorCanonical()
2048 NULL, &status); in TestCollatorCanonical()
2049 if(status == U_FILE_ACCESS_ERROR) { in TestCollatorCanonical()
2052 } else if(U_FAILURE(status)) { in TestCollatorCanonical()
2057 &status); in TestCollatorCanonical()
2058 if (U_FAILURE(status)) { in TestCollatorCanonical()
2059 log_err("Error opening string search %s\n", u_errorName(status)); in TestCollatorCanonical()
2067 COLLATORCANONICAL[1].strength, NULL, &status); in TestCollatorCanonical()
2068 if (U_FAILURE(status)) { in TestCollatorCanonical()
2069 log_err("Error opening rule based collator %s\n", u_errorName(status)); in TestCollatorCanonical()
2072 usearch_setCollator(strsrch, tailored, &status); in TestCollatorCanonical()
2073 if (U_FAILURE(status) || usearch_getCollator(strsrch) != tailored) { in TestCollatorCanonical()
2078 &status); in TestCollatorCanonical()
2083 usearch_setCollator(strsrch, EN_US_, &status); in TestCollatorCanonical()
2086 &status); in TestCollatorCanonical()
2087 if (U_FAILURE(status) || usearch_getCollator(strsrch) != EN_US_) { in TestCollatorCanonical()
2109 UErrorCode status = U_ZERO_ERROR; in TestPatternCanonical() local
2111 open(&status); in TestPatternCanonical()
2112 if (U_FAILURE(status)) { in TestPatternCanonical()
2113 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestPatternCanonical()
2121 NULL, &status); in TestPatternCanonical()
2123 &status); in TestPatternCanonical()
2124 if (U_FAILURE(status)) { in TestPatternCanonical()
2125 log_err("Error opening string search %s\n", u_errorName(status)); in TestPatternCanonical()
2137 usearch_setPattern(strsrch, pattern, -1, &status); in TestPatternCanonical()
2145 &status); in TestPatternCanonical()
2146 if (U_FAILURE(status)) { in TestPatternCanonical()
2147 log_err("Error setting pattern %s\n", u_errorName(status)); in TestPatternCanonical()
2154 usearch_setPattern(strsrch, pattern, -1, &status); in TestPatternCanonical()
2162 &status); in TestPatternCanonical()
2163 if (U_FAILURE(status)) { in TestPatternCanonical()
2164 log_err("Error setting pattern %s\n", u_errorName(status)); in TestPatternCanonical()
2184 UErrorCode status = U_ZERO_ERROR; in TestTextCanonical() local
2189 open(&status); in TestTextCanonical()
2190 if (U_FAILURE(status)) { in TestTextCanonical()
2191 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestTextCanonical()
2195 NULL, &status); in TestTextCanonical()
2197 &status); in TestTextCanonical()
2199 if (U_FAILURE(status)) { in TestTextCanonical()
2200 log_err("Error opening string search %s\n", u_errorName(status)); in TestTextCanonical()
2212 usearch_setText(strsrch, text, -1, &status); in TestTextCanonical()
2218 if (U_FAILURE(status)) { in TestTextCanonical()
2219 log_err("Error setting text %s\n", u_errorName(status)); in TestTextCanonical()
2226 usearch_setText(strsrch, text, -1, &status); in TestTextCanonical()
2232 if (U_FAILURE(status)) { in TestTextCanonical()
2233 log_err("Error setting pattern %s\n", u_errorName(status)); in TestTextCanonical()
2248 UErrorCode status = U_ZERO_ERROR; in TestCompositeBoundariesCanonical() local
2249 open(&status); in TestCompositeBoundariesCanonical()
2250 if (U_FAILURE(status)) { in TestCompositeBoundariesCanonical()
2251 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestCompositeBoundariesCanonical()
2269 UErrorCode status = U_ZERO_ERROR; in TestGetSetOffsetCanonical() local
2276 open(&status); in TestGetSetOffsetCanonical()
2277 if (U_FAILURE(status)) { in TestGetSetOffsetCanonical()
2278 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestGetSetOffsetCanonical()
2282 &status); in TestGetSetOffsetCanonical()
2285 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestGetSetOffsetCanonical()
2288 &status); in TestGetSetOffsetCanonical()
2291 usearch_setOffset(strsrch, -1, &status); in TestGetSetOffsetCanonical()
2292 if (U_SUCCESS(status)) { in TestGetSetOffsetCanonical()
2295 usearch_setOffset(strsrch, 128, &status); in TestGetSetOffsetCanonical()
2296 if (U_SUCCESS(status)) { in TestGetSetOffsetCanonical()
2312 status = U_ZERO_ERROR; in TestGetSetOffsetCanonical()
2313 usearch_setText(strsrch, text, -1, &status); in TestGetSetOffsetCanonical()
2314 usearch_setPattern(strsrch, pattern, -1, &status); in TestGetSetOffsetCanonical()
2315 while (U_SUCCESS(status) && matchindex >= 0) { in TestGetSetOffsetCanonical()
2317 usearch_next(strsrch, &status); in TestGetSetOffsetCanonical()
2334 &status); in TestGetSetOffsetCanonical()
2343 usearch_next(strsrch, &status); in TestGetSetOffsetCanonical()
2357 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in TestGetSetOffsetCanonical()
2365 UErrorCode status = U_ZERO_ERROR; in TestSupplementaryCanonical() local
2366 open(&status); in TestSupplementaryCanonical()
2367 if (U_FAILURE(status)) { in TestSupplementaryCanonical()
2368 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestSupplementaryCanonical()
2386 UErrorCode status = U_ZERO_ERROR; in TestContractionCanonical() local
2395 UCOL_TERTIARY, NULL, &status); in TestContractionCanonical()
2396 if(status == U_FILE_ACCESS_ERROR) { in TestContractionCanonical()
2399 } else if(U_FAILURE(status)) { in TestContractionCanonical()
2400 log_err("Error opening collator %s\n", u_errorName(status)); in TestContractionCanonical()
2404 &status); in TestContractionCanonical()
2406 &status); in TestContractionCanonical()
2407 if (U_FAILURE(status)) { in TestContractionCanonical()
2408 log_err("Error opening string search %s\n", u_errorName(status)); in TestContractionCanonical()
2414 usearch_setText(strsrch, text, -1, &status); in TestContractionCanonical()
2415 usearch_setPattern(strsrch, pattern, -1, &status); in TestContractionCanonical()
2429 UErrorCode status = U_ZERO_ERROR; in TestNumeric() local
2436 coll = ucol_open("", &status); in TestNumeric()
2437 if(U_FAILURE(status)) { in TestNumeric()
2442 ucol_setAttribute(coll, UCOL_NUMERIC_COLLATION, UCOL_ON, &status); in TestNumeric()
2444 strsrch = usearch_openFromCollator(pattern, 1, text, 1, coll, NULL, &status); in TestNumeric()
2446 if(status != U_UNSUPPORTED_ERROR || U_SUCCESS(status)) { in TestNumeric()
2447 …ying to instantiate a search object from a CODAN collator, got %s instead\n", u_errorName(status)); in TestNumeric()
2459 UErrorCode status = U_ZERO_ERROR; in TestForwardBackward() local
2466 coll = ucol_open("en_GB", &status); in TestForwardBackward()
2467 if (U_FAILURE(status)) { in TestForwardBackward()
2468 log_err_status(status, "ucol_open failed: %s\n", u_errorName(status)); in TestForwardBackward()
2471 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &status); in TestForwardBackward()
2472 ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_ON, &status); in TestForwardBackward()
2473 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status); in TestForwardBackward()
2478 search = usearch_openFromCollator(value, 2, usrcstr, 22, coll, NULL, &status); in TestForwardBackward()
2479 if (U_FAILURE(status)) { in TestForwardBackward()
2480 log_err("usearch_openFromCollator failed: %s\n", u_errorName(status)); in TestForwardBackward()
2486 pos = usearch_first(search, &status); in TestForwardBackward()
2495 pos = usearch_last(search, &status); in TestForwardBackward()
2739 UErrorCode status = U_ZERO_ERROR; in TestUsingSearchCollator() local
2740 UCollator* ucol = ucol_open(tuscItemPtr->locale, &status); in TestUsingSearchCollator()
2741 if ( U_SUCCESS(status) ) { in TestUsingSearchCollator()
2742 …Search* usrch = usearch_openFromCollator(dummyPat, -1, tuscItemPtr->text, -1, ucol, NULL, &status); in TestUsingSearchCollator()
2743 if ( U_SUCCESS(status) ) { in TestUsingSearchCollator()
2746 usearch_setPattern(usrch, patternsOffsetsPtr->pattern, -1, &status); in TestUsingSearchCollator()
2747 if ( U_SUCCESS(status) ) { in TestUsingSearchCollator()
2756 offset = usearch_next(usrch, &status); in TestUsingSearchCollator()
2757 if ( U_FAILURE(status) || offset == USEARCH_DONE ) { in TestUsingSearchCollator()
2771 if ( U_FAILURE(status) ) { in TestUsingSearchCollator()
2772 … log_err("error, locale %s, usearch_next failed: %s\n", tuscItemPtr->locale, u_errorName(status) ); in TestUsingSearchCollator()
2777 status = U_ZERO_ERROR; in TestUsingSearchCollator()
2782 offset = usearch_previous(usrch, &status); in TestUsingSearchCollator()
2783 if ( U_FAILURE(status) || offset == USEARCH_DONE ) { in TestUsingSearchCollator()
2797 if ( U_FAILURE(status) ) { in TestUsingSearchCollator()
2798 …_err("error, locale %s, usearch_previous failed: %s\n", tuscItemPtr->locale, u_errorName(status) ); in TestUsingSearchCollator()
2804 …rr("error, locale %s, usearch_setPattern failed: %s\n", tuscItemPtr->locale, u_errorName(status) ); in TestUsingSearchCollator()
2809 …ror, locale %s, usearch_openFromCollator failed: %s\n", tuscItemPtr->locale, u_errorName(status) ); in TestUsingSearchCollator()
2813 …og_data_err("error, locale %s, ucol_open failed: %s\n", tuscItemPtr->locale, u_errorName(status) ); in TestUsingSearchCollator()
2993 UErrorCode status = U_ZERO_ERROR; in TestIndicPrefixMatch() local
2994 open(&status); in TestIndicPrefixMatch()
2995 if (U_FAILURE(status)) { in TestIndicPrefixMatch()
2996 log_err_status(status, "Unable to open static collators %s\n", u_errorName(status)); in TestIndicPrefixMatch()