Lines Matching full:status

68     UErrorCode  status = U_ZERO_ERROR;  in TestBug672()  local
78 UCollator *coll = ucol_open(LOCALES[i], &status); in TestBug672()
80 &status); in TestBug672()
82 &status); in TestBug672()
83 if (U_FAILURE(status)) { in TestBug672()
84 …log_err_status(status, "ERROR: in creation of either the collator or the collation iterator :%s\n", in TestBug672()
85 myErrorName(status)); in TestBug672()
91 while (ucol_next(pitr, &status) != UCOL_NULLORDER && in TestBug672()
92 U_SUCCESS(status)) { in TestBug672()
94 if (U_FAILURE(status)) { in TestBug672()
96 myErrorName(status)); in TestBug672()
101 ucol_setOffset(titer, u_strlen(pattern), &status); in TestBug672()
102 if (U_FAILURE(status)) { in TestBug672()
104 myErrorName(status)); in TestBug672()
111 ucol_previous(titer, &status); in TestBug672()
117 ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status); in TestBug672()
118 if (U_FAILURE(status)) { in TestBug672()
120 myErrorName(status)); in TestBug672()
141 UErrorCode status = U_ZERO_ERROR; in TestBug672Normalize() local
151 UCollator *coll = ucol_open(LOCALES[i], &status); in TestBug672Normalize()
155 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestBug672Normalize()
157 pitr = ucol_openElements(coll, pattern, -1, &status); in TestBug672Normalize()
158 titer = ucol_openElements(coll, text, -1, &status); in TestBug672Normalize()
159 if (U_FAILURE(status)) { in TestBug672Normalize()
160 …log_err_status(status, "ERROR: in creation of either the collator or the collation iterator :%s\n", in TestBug672Normalize()
161 myErrorName(status)); in TestBug672Normalize()
167 while (ucol_next(pitr, &status) != UCOL_NULLORDER && in TestBug672Normalize()
168 U_SUCCESS(status)) { in TestBug672Normalize()
170 if (U_FAILURE(status)) { in TestBug672Normalize()
172 myErrorName(status)); in TestBug672Normalize()
177 ucol_setOffset(titer, u_strlen(pattern), &status); in TestBug672Normalize()
178 if (U_FAILURE(status)) { in TestBug672Normalize()
180 myErrorName(status)); in TestBug672Normalize()
187 ucol_previous(titer, &status); in TestBug672Normalize()
193 ucol_setOffset(titer, ucol_getOffset(titer) + 1, &status); in TestBug672Normalize()
194 if (U_FAILURE(status)) { in TestBug672Normalize()
196 myErrorName(status)); in TestBug672Normalize()
224 UErrorCode status = U_ZERO_ERROR; in TestUnicodeChar() local
228 en_us = ucol_open("en_US", &status); in TestUnicodeChar()
229 if (U_FAILURE(status)){ in TestUnicodeChar()
230 log_err_status(status, "ERROR: in creation of collation data using ucol_open()\n %s\n", in TestUnicodeChar()
231 myErrorName(status)); in TestUnicodeChar()
253 iter=ucol_openElements(en_us, source, u_strlen(source), &status); in TestUnicodeChar()
254 if(U_FAILURE(status)){ in TestUnicodeChar()
256 myErrorName(status)); in TestUnicodeChar()
266 iter=ucol_openElements(en_us, source, -1, &status); in TestUnicodeChar()
267 if(U_FAILURE(status)){ in TestUnicodeChar()
269 myErrorName(status)); in TestUnicodeChar()
290 UErrorCode status = U_ZERO_ERROR; in TestNormalizedUnicodeChar() local
295 th_th = ucol_open("th_TH", &status); in TestNormalizedUnicodeChar()
296 if (U_FAILURE(status)){ in TestNormalizedUnicodeChar()
297 log_err_status(status, "ERROR: in creation of thai collation using ucol_open()\n %s\n", in TestNormalizedUnicodeChar()
298 myErrorName(status)); in TestNormalizedUnicodeChar()
320 iter=ucol_openElements(th_th, source, u_strlen(source), &status); in TestNormalizedUnicodeChar()
321 if(U_FAILURE(status)){ in TestNormalizedUnicodeChar()
323 myErrorName(status)); in TestNormalizedUnicodeChar()
331 iter=ucol_openElements(th_th, source, -1, &status); in TestNormalizedUnicodeChar()
332 if(U_FAILURE(status)){ in TestNormalizedUnicodeChar()
334 myErrorName(status)); in TestNormalizedUnicodeChar()
351 UErrorCode status = U_ZERO_ERROR; in TestNormalization() local
370 coll = ucol_openRules(rule, rulelen, UCOL_ON, UCOL_TERTIARY, NULL, &status); in TestNormalization()
371 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestNormalization()
372 if (U_FAILURE(status)){ in TestNormalization()
373 log_err_status(status, "ERROR: in creation of collator using ucol_openRules()\n %s\n", in TestNormalization()
374 myErrorName(status)); in TestNormalization()
379 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
384 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
390 iter = ucol_openElements(coll, source, srclen, &status); in TestNormalization()
392 if (U_FAILURE(status)){ in TestNormalization()
394 myErrorName(status)); in TestNormalization()
400 iter = ucol_openElements(coll, source, -1, &status); in TestNormalization()
402 if (U_FAILURE(status)){ in TestNormalization()
404 myErrorName(status)); in TestNormalization()
427 UErrorCode status = U_ZERO_ERROR; in TestPrevious() local
433 coll = ucol_open("en_US", &status); in TestPrevious()
435 iter=ucol_openElements(coll, test1, u_strlen(test1), &status); in TestPrevious()
437 if(U_FAILURE(status)){ in TestPrevious()
438 …log_err_status(status, "ERROR: in creation of collation element iterator using ucol_openElements()… in TestPrevious()
439 myErrorName(status)); in TestPrevious()
450 c1 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status); in TestPrevious()
454 if (c1 == NULL || U_FAILURE(status)) in TestPrevious()
457 myErrorName(status)); in TestPrevious()
462 iter=ucol_openElements(c1, source, u_strlen(source), &status); in TestPrevious()
463 if(U_FAILURE(status)){ in TestPrevious()
465 myErrorName(status)); in TestPrevious()
474 c2 = ucol_openRules(rule, u_strlen(rule), UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status); in TestPrevious()
476 if (c2 == NULL || U_FAILURE(status)) in TestPrevious()
479 myErrorName(status)); in TestPrevious()
483 iter=ucol_openElements(c2, source, u_strlen(source), &status); in TestPrevious()
484 if(U_FAILURE(status)){ in TestPrevious()
486 myErrorName(status)); in TestPrevious()
494 c3 = ucol_openRules(rule, u_strlen(rule), UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH,NULL, &status); in TestPrevious()
497 if (c3 == NULL || U_FAILURE(status)) in TestPrevious()
500 myErrorName(status)); in TestPrevious()
504 iter=ucol_openElements(c3, source, u_strlen(source), &status); in TestPrevious()
505 if(U_FAILURE(status)){ in TestPrevious()
507 myErrorName(status)); in TestPrevious()
523 coll = ucol_open("th_TH", &status); in TestPrevious()
525 iter=ucol_openElements(coll, source, u_strlen(source), &status); in TestPrevious()
526 if(U_FAILURE(status)){ in TestPrevious()
528 myErrorName(status)); in TestPrevious()
542 coll = ucol_open("ja_JP", &status); in TestPrevious()
544 iter=ucol_openElements(coll, source, u_strlen(source), &status); in TestPrevious()
545 if(U_FAILURE(status)){ in TestPrevious()
547 myErrorName(status)); in TestPrevious()
562 UErrorCode status= U_ZERO_ERROR; in TestOffset() local
574 en_us = ucol_open("en_US", &status); in TestOffset()
576 iter = ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestOffset()
577 if(U_FAILURE(status)){ in TestOffset()
578 …log_err_status(status, "ERROR: in creation of collation element iterator using ucol_openElements()… in TestOffset()
579 myErrorName(status)); in TestOffset()
585 ucol_setOffset(iter, 0, &status); in TestOffset()
586 if (U_FAILURE(status) || ucol_previous(iter, &status) != UCOL_NULLORDER) { in TestOffset()
590 ucol_setOffset(iter, u_strlen(test1), &status); in TestOffset()
591 if (U_FAILURE(status) || ucol_next(iter, &status) != UCOL_NULLORDER) { in TestOffset()
609 pristine=ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestOffset()
610 if(U_FAILURE(status)){ in TestOffset()
612 myErrorName(status)); in TestOffset()
616 status = U_ZERO_ERROR; in TestOffset()
618 ucol_setOffset(iter, 0, &status); in TestOffset()
619 if (U_FAILURE(status)) in TestOffset()
621 log_err("setOffset failed. %s\n", myErrorName(status)); in TestOffset()
638 ucol_setAttribute(en_us, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestOffset()
639 iter = ucol_openElements(en_us, test1, 4, &status); in TestOffset()
640 if(U_FAILURE(status)){ in TestOffset()
642 myErrorName(status)); in TestOffset()
648 while (ucol_next(iter, &status) != UCOL_NULLORDER && in TestOffset()
649 U_SUCCESS(status)) { in TestOffset()
671 while (ucol_previous(iter, &status) != UCOL_NULLORDER && in TestOffset()
672 U_SUCCESS(status)) { in TestOffset()
693 if(U_FAILURE(status)){ in TestOffset()
695 myErrorName(status)); in TestOffset()
708 UErrorCode status = U_ZERO_ERROR; in TestSetText() local
716 en_us = ucol_open("en_US", &status); in TestSetText()
718 iter1=ucol_openElements(en_us, test1, u_strlen(test1), &status); in TestSetText()
719 if(U_FAILURE(status)){ in TestSetText()
720 …log_err_status(status, "ERROR: in creation of collation element iterator1 using ucol_openElements(… in TestSetText()
721 myErrorName(status)); in TestSetText()
725 iter2=ucol_openElements(en_us, test2, u_strlen(test2), &status); in TestSetText()
726 if(U_FAILURE(status)){ in TestSetText()
728 myErrorName(status)); in TestSetText()
734 c = ucol_next(iter2, &status); in TestSetText()
739 if (U_FAILURE(status)) in TestSetText()
741 log_err("iter2->next() returned an error. %s\n", myErrorName(status)); in TestSetText()
748 c = ucol_next(iter2, &status); in TestSetText()
752 ucol_setText(iter2, test1, u_strlen(test1), &status); in TestSetText()
753 if (U_FAILURE(status)) in TestSetText()
755 log_err("call to iter2->setText(test1) failed. %s\n", myErrorName(status)); in TestSetText()
763 ucol_setText(iter2, NULL, 2, &status); in TestSetText()
764 if (status != U_ILLEGAL_ARGUMENT_ERROR) in TestSetText()
767 myErrorName(status)); in TestSetText()
780 UErrorCode status = U_ZERO_ERROR; in TestMaxExpansion() local
781 UCollator *coll ;/*= ucol_open("en_US", &status);*/ in TestMaxExpansion()
788 UCollationElements *iter ;/*= ucol_openElements(coll, &ch, 1, &status);*/ in TestMaxExpansion()
794 UCOL_DEFAULT_STRENGTH,NULL, &status); in TestMaxExpansion()
795 if(U_SUCCESS(status) && coll) { in TestMaxExpansion()
796 iter = ucol_openElements(coll, &ch, 1, &status); in TestMaxExpansion()
798 while (ch < 0xFFFF && U_SUCCESS(status)) { in TestMaxExpansion()
805 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
806 order = ucol_previous(iter, &status); in TestMaxExpansion()
810 order = ucol_previous(iter, &status); in TestMaxExpansion()
812 while (U_SUCCESS(status) && in TestMaxExpansion()
813 ucol_previous(iter, &status) != UCOL_NULLORDER) { in TestMaxExpansion()
818 if (U_FAILURE(status) || size < count) { in TestMaxExpansion()
829 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
830 order = ucol_previous(iter, &status); in TestMaxExpansion()
832 if (U_FAILURE(status) || size != 1) { in TestMaxExpansion()
840 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
841 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
843 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 3) { in TestMaxExpansion()
849 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
850 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
852 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 1) { in TestMaxExpansion()
859 ucol_setText(iter, supplementary, 2, &status); in TestMaxExpansion()
860 sorder = ucol_previous(iter, &status); in TestMaxExpansion()
862 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, sorder) != 2) { in TestMaxExpansion()
870 ucol_setText(iter, &ch, 1, &status); in TestMaxExpansion()
871 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
872 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) > 3) { in TestMaxExpansion()
893 UCOL_DEFAULT_STRENGTH,NULL, &status); in TestMaxExpansion()
894 iter = ucol_openElements(coll, &ch, 1, &status); in TestMaxExpansion()
896 temporder = ucol_previous(iter, &status); in TestMaxExpansion()
897 if (U_FAILURE(status) || ucol_getMaxExpansion(iter, temporder) != 6) { in TestMaxExpansion()
905 log_err_status(status, "Couldn't open collator -> %s\n", u_errorName(status)); in TestMaxExpansion()
915 UErrorCode status = U_ZERO_ERROR; in assertEqual() local
919 c1 = ucol_next(i1, &status); in assertEqual()
920 c2 = ucol_next(i2, &status); in assertEqual()
938 UErrorCode status = U_ZERO_ERROR; in TestSmallBuffer() local
961 coll = ucol_open("th_TH", &status); in TestSmallBuffer()
962 if(U_SUCCESS(status) && coll) { in TestSmallBuffer()
963 testiter = ucol_openElements(coll, teststr, 500, &status); in TestSmallBuffer()
964 iter = ucol_openElements(coll, str, 2, &status); in TestSmallBuffer()
996 ucol_next(testiter, &status); in TestSmallBuffer()
997 ucol_next(testiter, &status); in TestSmallBuffer()
1002 log_err_status(status, "Couldn't open collator -> %s\n", u_errorName(status)); in TestSmallBuffer()
1047 UErrorCode status = U_ZERO_ERROR; in TestDiscontiguos() local
1052 coll = ucol_openRules(rule, rulelen, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status); in TestDiscontiguos()
1053 iter = ucol_openElements(coll, rule, 1, &status); in TestDiscontiguos()
1054 resultiter = ucol_openElements(coll, rule, 1, &status); in TestDiscontiguos()
1056 if (U_FAILURE(status)) { in TestDiscontiguos()
1057 log_err_status(status, "Error opening collation rules -> %s\n", u_errorName(status)); in TestDiscontiguos()
1067 ucol_setText(iter, str, strLen, &status); in TestDiscontiguos()
1068 if (U_FAILURE(status)) { in TestDiscontiguos()
1084 ucol_setText(resultiter, s, (int32_t)(e - s), &status); in TestDiscontiguos()
1085 ce = ucol_next(resultiter, &status); in TestDiscontiguos()
1086 if (U_FAILURE(status)) { in TestDiscontiguos()
1091 if (ce != (uint32_t)ucol_next(iter, &status) || in TestDiscontiguos()
1092 U_FAILURE(status)) { in TestDiscontiguos()
1096 ce = ucol_next(resultiter, &status); in TestDiscontiguos()
1097 if (U_FAILURE(status)) { in TestDiscontiguos()
1190 UErrorCode status = U_ZERO_ERROR; in TestSearchCollatorElements() local
1191 UCollator* ucol = ucol_open(tsceItemPtr->locale, &status); in TestSearchCollatorElements()
1192 if ( U_SUCCESS(status) ) { in TestSearchCollatorElements()
1193 UCollationElements * uce = ucol_openElements(ucol, tsceText, kLen_tsceText, &status); in TestSearchCollatorElements()
1194 if ( U_SUCCESS(status) ) { in TestSearchCollatorElements()
1203 element = ucol_next(uce, &status); in TestSearchCollatorElements()
1219 } while ( U_SUCCESS(status) && element != UCOL_NULLORDER ); in TestSearchCollatorElements()
1224 ucol_setOffset(uce, kLen_tsceText, &status); in TestSearchCollatorElements()
1225 status = U_ZERO_ERROR; in TestSearchCollatorElements()
1230 element = ucol_previous(uce, &status); in TestSearchCollatorElements()
1245 } while ( U_SUCCESS(status) && element != UCOL_NULLORDER ); in TestSearchCollatorElements()
1252 …err("error, locale %s, ucol_openElements failed: %s\n", tsceItemPtr->locale, u_errorName(status) ); in TestSearchCollatorElements()
1256 …og_data_err("error, locale %s, ucol_open failed: %s\n", tsceItemPtr->locale, u_errorName(status) ); in TestSearchCollatorElements()