Lines Matching refs:status

67     UErrorCode  status = U_ZERO_ERROR;  in TestBug672()  local
77 UCollator *coll = ucol_open(LOCALES[i], &status); in TestBug672()
79 &status); in TestBug672()
81 &status); in TestBug672()
82 if (U_FAILURE(status)) { in TestBug672()
83 …log_err_status(status, "ERROR: in creation of either the collator or the collation iterator :%s\n", in TestBug672()
84 myErrorName(status)); in TestBug672()
90 while (ucol_next(pitr, &status) != UCOL_NULLORDER && in TestBug672()
91 U_SUCCESS(status)) { in TestBug672()
93 if (U_FAILURE(status)) { in TestBug672()
95 myErrorName(status)); in TestBug672()
100 ucol_setOffset(titer, u_strlen(pattern), &status); in TestBug672()
101 if (U_FAILURE(status)) { in TestBug672()
103 myErrorName(status)); in TestBug672()
110 ucol_previous(titer, &status); in TestBug672()
116 ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status); in TestBug672()
117 if (U_FAILURE(status)) { in TestBug672()
119 myErrorName(status)); in TestBug672()
140 UErrorCode status = U_ZERO_ERROR; in TestBug672Normalize() local
150 UCollator *coll = ucol_open(LOCALES[i], &status); in TestBug672Normalize()
154 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestBug672Normalize()
156 pitr = ucol_openElements(coll, pattern, -1, &status); in TestBug672Normalize()
157 titer = ucol_openElements(coll, text, -1, &status); in TestBug672Normalize()
158 if (U_FAILURE(status)) { in TestBug672Normalize()
159 …log_err_status(status, "ERROR: in creation of either the collator or the collation iterator :%s\n", in TestBug672Normalize()
160 myErrorName(status)); in TestBug672Normalize()
166 while (ucol_next(pitr, &status) != UCOL_NULLORDER && in TestBug672Normalize()
167 U_SUCCESS(status)) { in TestBug672Normalize()
169 if (U_FAILURE(status)) { in TestBug672Normalize()
171 myErrorName(status)); in TestBug672Normalize()
176 ucol_setOffset(titer, u_strlen(pattern), &status); in TestBug672Normalize()
177 if (U_FAILURE(status)) { in TestBug672Normalize()
179 myErrorName(status)); in TestBug672Normalize()
186 ucol_previous(titer, &status); in TestBug672Normalize()
192 ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status); in TestBug672Normalize()
193 if (U_FAILURE(status)) { in TestBug672Normalize()
195 myErrorName(status)); in TestBug672Normalize()
223 UErrorCode status = U_ZERO_ERROR; in TestUnicodeChar() local
227 en_us = ucol_open("en_US", &status); in TestUnicodeChar()
228 if (U_FAILURE(status)){ in TestUnicodeChar()
229 log_err_status(status, "ERROR: in creation of collation data using ucol_open()\n %s\n", in TestUnicodeChar()
230 myErrorName(status)); in TestUnicodeChar()
252 iter=ucol_openElements(en_us, source, u_strlen(source), &status); in TestUnicodeChar()
253 if(U_FAILURE(status)){ in TestUnicodeChar()
255 myErrorName(status)); in TestUnicodeChar()
265 iter=ucol_openElements(en_us, source, -1, &status); in TestUnicodeChar()
266 if(U_FAILURE(status)){ in TestUnicodeChar()
268 myErrorName(status)); in TestUnicodeChar()
289 UErrorCode status = U_ZERO_ERROR; in TestNormalizedUnicodeChar() local
294 th_th = ucol_open("th_TH", &status); in TestNormalizedUnicodeChar()
295 if (U_FAILURE(status)){ in TestNormalizedUnicodeChar()
296 log_err_status(status, "ERROR: in creation of thai collation using ucol_open()\n %s\n", in TestNormalizedUnicodeChar()
297 myErrorName(status)); in TestNormalizedUnicodeChar()
319 iter=ucol_openElements(th_th, source, u_strlen(source), &status); in TestNormalizedUnicodeChar()
320 if(U_FAILURE(status)){ in TestNormalizedUnicodeChar()
322 myErrorName(status)); in TestNormalizedUnicodeChar()
330 iter=ucol_openElements(th_th, source, -1, &status); in TestNormalizedUnicodeChar()
331 if(U_FAILURE(status)){ in TestNormalizedUnicodeChar()
333 myErrorName(status)); in TestNormalizedUnicodeChar()
350 UErrorCode status = U_ZERO_ERROR; in TestNormalization() local
369 coll = ucol_openRules(rule, rulelen, UCOL_ON, UCOL_TERTIARY, NULL, &status); in TestNormalization()
370 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestNormalization()
371 if (U_FAILURE(status)){ in TestNormalization()
372 log_err_status(status, "ERROR: in creation of collator using ucol_openRules()\n %s\n", in TestNormalization()
373 myErrorName(status)); in TestNormalization()
378 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
383 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
389 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
391 if (U_FAILURE(status)){ in TestNormalization()
393 myErrorName(status)); in TestNormalization()
399 iter = ucol_openElements(coll, source, -1, &status); in TestNormalization()
401 if (U_FAILURE(status)){ in TestNormalization()
403 myErrorName(status)); in TestNormalization()
426 UErrorCode status = U_ZERO_ERROR; in TestPrevious() local
432 coll = ucol_open("en_US", &status); in TestPrevious()
434 iter=ucol_openElements(coll, test1, u_strlen(test1), &status); in TestPrevious()
436 if(U_FAILURE(status)){ in TestPrevious()
437 …log_err_status(status, "ERROR: in creation of collation element iterator using ucol_openElements()… in TestPrevious()
438 myErrorName(status)); in TestPrevious()
449 c1 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status); in TestPrevious()
453 if (c1 == NULL || U_FAILURE(status)) in TestPrevious()
456 myErrorName(status)); in TestPrevious()
461 iter=ucol_openElements(c1, source, u_strlen(source), &status); in TestPrevious()
462 if(U_FAILURE(status)){ in TestPrevious()
464 myErrorName(status)); in TestPrevious()
473 c2 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status); in TestPrevious()
475 if (c2 == NULL || U_FAILURE(status)) in TestPrevious()
478 myErrorName(status)); in TestPrevious()
482 iter=ucol_openElements(c2, source, u_strlen(source), &status); in TestPrevious()
483 if(U_FAILURE(status)){ in TestPrevious()
485 myErrorName(status)); in TestPrevious()
493 c3 = ucol_openRules(rule, u_strlen(rule), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH,NULL, &status); in TestPrevious()
496 if (c3 == NULL || U_FAILURE(status)) in TestPrevious()
499 myErrorName(status)); in TestPrevious()
503 iter=ucol_openElements(c3, source, u_strlen(source), &status); in TestPrevious()
504 if(U_FAILURE(status)){ in TestPrevious()
506 myErrorName(status)); in TestPrevious()
522 coll = ucol_open("th_TH", &status); in TestPrevious()
524 iter=ucol_openElements(coll, source, u_strlen(source), &status); in TestPrevious()
525 if(U_FAILURE(status)){ in TestPrevious()
527 myErrorName(status)); in TestPrevious()
541 coll = ucol_open("ja_JP", &status); in TestPrevious()
543 iter=ucol_openElements(coll, source, u_strlen(source), &status); in TestPrevious()
544 if(U_FAILURE(status)){ in TestPrevious()
546 myErrorName(status)); in TestPrevious()
561 UErrorCode status= U_ZERO_ERROR; in TestOffset() local
573 en_us = ucol_open("en_US", &status); in TestOffset()
575 iter = ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestOffset()
576 if(U_FAILURE(status)){ in TestOffset()
577 …log_err_status(status, "ERROR: in creation of collation element iterator using ucol_openElements()… in TestOffset()
578 myErrorName(status)); in TestOffset()
584 ucol_setOffset(iter, 0, &status); in TestOffset()
585 if (U_FAILURE(status) || ucol_previous(iter, &status) != UCOL_NULLORDER) { in TestOffset()
589 ucol_setOffset(iter, u_strlen(test1), &status); in TestOffset()
590 if (U_FAILURE(status) || ucol_next(iter, &status) != UCOL_NULLORDER) { in TestOffset()
608 pristine=ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestOffset()
609 if(U_FAILURE(status)){ in TestOffset()
611 myErrorName(status)); in TestOffset()
615 status = U_ZERO_ERROR; in TestOffset()
617 ucol_setOffset(iter, 0, &status); in TestOffset()
618 if (U_FAILURE(status)) in TestOffset()
620 log_err("setOffset failed. %s\n", myErrorName(status)); in TestOffset()
637 ucol_setAttribute(en_us, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestOffset()
638 iter = ucol_openElements(en_us, test1, 4, &status); in TestOffset()
639 if(U_FAILURE(status)){ in TestOffset()
641 myErrorName(status)); in TestOffset()
647 while (ucol_next(iter, &status) != UCOL_NULLORDER && in TestOffset()
648 U_SUCCESS(status)) { in TestOffset()
670 while (ucol_previous(iter, &status) != UCOL_NULLORDER && in TestOffset()
671 U_SUCCESS(status)) { in TestOffset()
692 if(U_FAILURE(status)){ in TestOffset()
694 myErrorName(status)); in TestOffset()
707 UErrorCode status = U_ZERO_ERROR; in TestSetText() local
715 en_us = ucol_open("en_US", &status); in TestSetText()
717 iter1=ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestSetText()
718 if(U_FAILURE(status)){ in TestSetText()
719 …log_err_status(status, "ERROR: in creation of collation element iterator1 using ucol_openElements(… in TestSetText()
720 myErrorName(status)); in TestSetText()
724 iter2=ucol_openElements(en_us, test2, u_strlen(test2), &status); in TestSetText()
725 if(U_FAILURE(status)){ in TestSetText()
727 myErrorName(status)); in TestSetText()
733 c = ucol_next(iter2, &status); in TestSetText()
738 if (U_FAILURE(status)) in TestSetText()
740 log_err("iter2->next() returned an error. %s\n", myErrorName(status)); in TestSetText()
747 c = ucol_next(iter2, &status); in TestSetText()
751 ucol_setText(iter2, test1, u_strlen(test1), &status); in TestSetText()
752 if (U_FAILURE(status)) in TestSetText()
754 log_err("call to iter2->setText(test1) failed. %s\n", myErrorName(status)); in TestSetText()
762 ucol_setText(iter2, NULL, 2, &status); in TestSetText()
763 if (status != U_ILLEGAL_ARGUMENT_ERROR) in TestSetText()
766 myErrorName(status)); in TestSetText()
779 UErrorCode status = U_ZERO_ERROR; in TestMaxExpansion() local
793 UCOL_DEFAULT_STRENGTH,NULL, &status); in TestMaxExpansion()
794 if(U_SUCCESS(status) && coll) { in TestMaxExpansion()
795 iter = ucol_openElements(coll, &ch, 1, &status); in TestMaxExpansion()
797 while (ch < 0xFFFF && U_SUCCESS(status)) { in TestMaxExpansion()
804 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
805 order = ucol_previous(iter, &status); in TestMaxExpansion()
809 order = ucol_previous(iter, &status); in TestMaxExpansion()
811 while (U_SUCCESS(status) && in TestMaxExpansion()
812 ucol_previous(iter, &status) != UCOL_NULLORDER) { in TestMaxExpansion()
817 if (U_FAILURE(status) || size < count) { in TestMaxExpansion()
828 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
829 order = ucol_previous(iter, &status); in TestMaxExpansion()
831 if (U_FAILURE(status) || size != 1) { in TestMaxExpansion()
839 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
840 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
842 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 3) { in TestMaxExpansion()
848 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
849 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
851 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 1) { in TestMaxExpansion()
858 ucol_setText(iter, supplementary, 2, &status); in TestMaxExpansion()
859 sorder = ucol_previous(iter, &status); in TestMaxExpansion()
861 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, sorder) != 2) { in TestMaxExpansion()
869 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
870 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
871 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) > 3) { in TestMaxExpansion()
892 UCOL_DEFAULT_STRENGTH,NULL, &status); in TestMaxExpansion()
893 iter = ucol_openElements(coll, &ch, 1, &status); in TestMaxExpansion()
895 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
896 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 6) { in TestMaxExpansion()
904 log_err_status(status, "Couldn't open collator -> %s\n", u_errorName(status)); in TestMaxExpansion()
914 UErrorCode status = U_ZERO_ERROR; in assertEqual() local
918 c1 = ucol_next(i1, &status); in assertEqual()
919 c2 = ucol_next(i2, &status); in assertEqual()
937 UErrorCode status = U_ZERO_ERROR; in TestSmallBuffer() local
960 coll = ucol_open("th_TH", &status); in TestSmallBuffer()
961 if(U_SUCCESS(status) && coll) { in TestSmallBuffer()
962 testiter = ucol_openElements(coll, teststr, 500, &status); in TestSmallBuffer()
963 iter = ucol_openElements(coll, str, 2, &status); in TestSmallBuffer()
995 ucol_next(testiter, &status); in TestSmallBuffer()
996 ucol_next(testiter, &status); in TestSmallBuffer()
1001 log_err_status(status, "Couldn't open collator -> %s\n", u_errorName(status)); in TestSmallBuffer()
1046 UErrorCode status = U_ZERO_ERROR; in TestDiscontiguos() local
1051 coll = ucol_openRules(rule, rulelen, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status); in TestDiscontiguos()
1052 iter = ucol_openElements(coll, rule, 1, &status); in TestDiscontiguos()
1053 resultiter = ucol_openElements(coll, rule, 1, &status); in TestDiscontiguos()
1055 if (U_FAILURE(status)) { in TestDiscontiguos()
1056 log_err_status(status, "Error opening collation rules -> %s\n", u_errorName(status)); in TestDiscontiguos()
1066 ucol_setText(iter, str, strLen, &status); in TestDiscontiguos()
1067 if (U_FAILURE(status)) { in TestDiscontiguos()
1083 ucol_setText(resultiter, s, (int32_t)(e - s), &status); in TestDiscontiguos()
1084 ce = ucol_next(resultiter, &status); in TestDiscontiguos()
1085 if (U_FAILURE(status)) { in TestDiscontiguos()
1090 if (ce != (uint32_t)ucol_next(iter, &status) || in TestDiscontiguos()
1091 U_FAILURE(status)) { in TestDiscontiguos()
1095 ce = ucol_next(resultiter, &status); in TestDiscontiguos()
1096 if (U_FAILURE(status)) { in TestDiscontiguos()
1189 UErrorCode status = U_ZERO_ERROR; in TestSearchCollatorElements() local
1190 UCollator* ucol = ucol_open(tsceItemPtr->locale, &status); in TestSearchCollatorElements()
1191 if ( U_SUCCESS(status) ) { in TestSearchCollatorElements()
1192 UCollationElements * uce = ucol_openElements(ucol, tsceText, kLen_tsceText, &status); in TestSearchCollatorElements()
1193 if ( U_SUCCESS(status) ) { in TestSearchCollatorElements()
1202 element = ucol_next(uce, &status); in TestSearchCollatorElements()
1218 } while ( U_SUCCESS(status) && element != UCOL_NULLORDER ); in TestSearchCollatorElements()
1223 ucol_setOffset(uce, kLen_tsceText, &status); in TestSearchCollatorElements()
1224 status = U_ZERO_ERROR; in TestSearchCollatorElements()
1229 element = ucol_previous(uce, &status); in TestSearchCollatorElements()
1244 } while ( U_SUCCESS(status) && element != UCOL_NULLORDER ); in TestSearchCollatorElements()
1251 …err("error, locale %s, ucol_openElements failed: %s\n", tsceItemPtr->locale, u_errorName(status) ); in TestSearchCollatorElements()
1255 …og_data_err("error, locale %s, ucol_open failed: %s\n", tsceItemPtr->locale, u_errorName(status) ); in TestSearchCollatorElements()