Lines Matching refs:status
46 UErrorCode status = U_ZERO_ERROR;
48 m_en_us_ = (RuleBasedCollator *)Collator::createInstance("en_US", status);
49 m_fr_fr_ = (RuleBasedCollator *)Collator::createInstance("fr_FR", status);
50 m_de_ = (RuleBasedCollator *)Collator::createInstance("de_DE", status);
51 m_es_ = (RuleBasedCollator *)Collator::createInstance("es_ES", status);
52 if(U_FAILURE(status)) {
61 errln("Collator creation failed with %s", u_errorName(status));
73 m_de_ = new RuleBasedCollator(rules, status);
80 m_es_ = new RuleBasedCollator(rules, status);
84 Locale::getEnglish(), status);
86 Locale::getEnglish(), status);
258 UErrorCode status = U_ZERO_ERROR;
262 strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, search->elemCompare, status);
263 if (U_FAILURE(status)) {
264 errln("Error setting USEARCH_ELEMENT_COMPARISON attribute %s", u_errorName(status));
273 while (U_SUCCESS(status) && matchindex >= 0) {
275 strsrch->next(status);
291 if (U_FAILURE(status) ||
301 strsrch->next(status);
315 while (U_SUCCESS(status) && matchindex >= 0) {
317 strsrch->previous(status);
331 if (U_FAILURE(status) ||
342 strsrch->previous(status);
353 strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, USEARCH_STANDARD_ELEMENT_COMPARISON, status);
359 UErrorCode status = U_ZERO_ERROR;
385 breaker, status);
386 if (U_FAILURE(status)) {
387 errln("Error opening string search %s", u_errorName(status));
417 UErrorCode status = U_ZERO_ERROR;
443 collator->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
445 breaker, status);
446 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
447 if (U_FAILURE(status)) {
448 errln("Error opening string search %s", u_errorName(status));
460 collator->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
470 UErrorCode status = U_ZERO_ERROR;
497 breaker, status);
498 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, canonical, status);
499 strsrch->setAttribute(USEARCH_OVERLAP, overlap, status);
501 if (U_FAILURE(status)) {
502 errln("Error opening string search %s", u_errorName(status));
518 UErrorCode status = U_ZERO_ERROR;
527 result = new StringSearch(pattern, text, NULL, NULL, status);
528 if (U_SUCCESS(status)) {
534 status = U_ZERO_ERROR;
535 result = new StringSearch(pattern, chariter, NULL, NULL, status);
536 if (U_SUCCESS(status)) {
542 status = U_ZERO_ERROR;
543 result = new StringSearch(pattern, text, NULL, NULL, status);
544 if (U_SUCCESS(status)) {
550 status = U_ZERO_ERROR;
551 result = new StringSearch(pattern, chariter, NULL, NULL, status);
552 if (U_SUCCESS(status)) {
559 status = U_ZERO_ERROR;
560 result = new StringSearch(pattern, text, NULL, NULL, status);
561 if (U_SUCCESS(status)) {
567 status = U_ZERO_ERROR;
568 result = new StringSearch(pattern, chariter, NULL, NULL, status);
569 if (U_SUCCESS(status)) {
575 status = U_ZERO_ERROR;
576 result = new StringSearch(pattern, text, NULL, NULL, status);
577 if (U_SUCCESS(status)) {
583 status = U_ZERO_ERROR;
584 result = new StringSearch(pattern, chariter, NULL, NULL, status);
585 if (U_SUCCESS(status)) {
590 status = U_ZERO_ERROR;
591 result = new StringSearch(pattern, text, m_en_us_, NULL, status);
592 if (U_FAILURE(status)) {
597 status = U_ZERO_ERROR;
598 result = new StringSearch(pattern, chariter, m_en_us_, NULL, status);
599 if (U_FAILURE(status)) {
604 status = U_ZERO_ERROR;
605 result = new StringSearch(pattern, text, Locale::getEnglish(), NULL, status);
606 if (U_FAILURE(status) || result == NULL) {
611 status = U_ZERO_ERROR;
612 result = new StringSearch(pattern, chariter, Locale::getEnglish(), NULL, status);
613 if (U_FAILURE(status)) {
618 status = U_ZERO_ERROR;
619 result = new StringSearch(pattern, text, m_en_us_, breakiter, status);
620 if (U_FAILURE(status)) {
625 status = U_ZERO_ERROR;
626 result = new StringSearch(pattern, chariter, m_en_us_, NULL, status);
627 if (U_FAILURE(status)) {
635 UErrorCode status = U_ZERO_ERROR;
648 result = new StringSearch(pattern, text, m_en_us_, NULL, status);
649 if (U_FAILURE(status)) {
650 errln("Error opening search %s", u_errorName(status));
683 result = new StringSearch(pattern, text, m_en_us_, NULL, status);
701 if (U_FAILURE(status)) {
702 errln("Error opening search %s", u_errorName(status));
723 UErrorCode status = U_ZERO_ERROR;
724 m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
725 if (U_FAILURE(status)) {
727 u_errorName(status));
742 m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
775 UErrorCode status = U_ZERO_ERROR;
777 status);
778 if (U_FAILURE(status)) {
779 errln("Error opening string search %s", u_errorName(status));
782 strsrch->setBreakIterator(NULL, status);
783 if (U_FAILURE(status) || strsrch->getBreakIterator() != NULL) {
787 strsrch->setBreakIterator(m_en_characterbreaker_, status);
788 if (U_FAILURE(status) ||
793 strsrch->setBreakIterator(m_en_wordbreaker_, status);
794 if (U_FAILURE(status) ||
818 strsrch = new StringSearch(pattern, text, collator, breaker, status);
819 if (U_FAILURE(status) ||
835 strsrch->setBreakIterator(breaker, status);
836 if (U_FAILURE(status) ||
862 UErrorCode status = U_ZERO_ERROR;
863 m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
864 if (U_FAILURE(status)) {
866 u_errorName(status));
876 status);
909 UErrorCode status = U_ZERO_ERROR;
912 status);
914 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
915 if (U_FAILURE(status) ||
925 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
926 if (U_FAILURE(status) ||
952 UErrorCode status = U_ZERO_ERROR;
954 status);
955 if (U_FAILURE(status)) {
956 errln("Error opening string search %s", u_errorName(status));
968 RuleBasedCollator *tailored = new RuleBasedCollator(rules, status);
971 if (U_FAILURE(status)) {
972 errln("Error opening rule based collator %s", u_errorName(status));
980 strsrch->setCollator(tailored, status);
981 if (U_FAILURE(status) || (*strsrch->getCollator()) != (*tailored)) {
997 strsrch->setCollator(m_en_us_, status);
999 if (U_FAILURE(status) || (*strsrch->getCollator()) != (*m_en_us_)) {
1028 UErrorCode status = U_ZERO_ERROR;
1030 status);
1032 if (U_FAILURE(status)) {
1033 errln("Error opening string search %s", u_errorName(status));
1053 strsrch->setPattern(pattern, status);
1063 if (U_FAILURE(status)) {
1064 errln("Error setting pattern %s", u_errorName(status));
1076 strsrch->setPattern(pattern, status);
1086 if (U_FAILURE(status)) {
1087 errln("Error setting pattern %s", u_errorName(status));
1102 strsrch->setPattern(pattern, status);
1103 if (U_FAILURE(status)) {
1104 errln("Error setting pattern with size 512, %s", u_errorName(status));
1122 UErrorCode status = U_ZERO_ERROR;
1124 status);
1125 if (U_FAILURE(status)) {
1126 errln("Error opening string search %s", u_errorName(status));
1139 strsrch->setText(text, status);
1145 if (U_FAILURE(status)) {
1146 errln("Error setting text %s", u_errorName(status));
1156 strsrch->setText(chariter, status);
1162 if (U_FAILURE(status)) {
1163 errln("Error setting pattern %s", u_errorName(status));
1185 UErrorCode status = U_ZERO_ERROR;
1189 NULL, status);
1191 strsrch->setOffset(-1, status);
1192 if (U_SUCCESS(status)) {
1195 strsrch->setOffset(128, status);
1196 if (U_SUCCESS(status)) {
1201 UErrorCode status = U_ZERO_ERROR;
1209 strsrch->setText(text, status);
1210 strsrch->setPattern(pattern, status);
1217 while (U_SUCCESS(status) && matchindex >= 0) {
1219 strsrch->next(status);
1234 strsrch->setOffset(search.offset[count + 1] + 1, status);
1243 strsrch->next(status);
1262 UErrorCode status = U_ZERO_ERROR;
1266 status);
1267 if (U_FAILURE(status)) {
1268 errln("Error opening search %s", u_errorName(status));
1272 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_DEFAULT, status);
1273 if (U_FAILURE(status) ||
1277 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
1278 if (U_FAILURE(status) ||
1282 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
1283 if (U_FAILURE(status) ||
1288 status);
1289 if (U_SUCCESS(status)) {
1292 status = U_ZERO_ERROR;
1293 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_DEFAULT, status);
1294 if (U_FAILURE(status) ||
1298 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1299 if (U_FAILURE(status) ||
1303 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_OFF, status);
1304 if (U_FAILURE(status) ||
1309 USEARCH_ATTRIBUTE_VALUE_COUNT, status);
1310 if (U_SUCCESS(status)) {
1313 status = U_ZERO_ERROR;
1314 strsrch->setAttribute(USEARCH_ATTRIBUTE_COUNT, USEARCH_DEFAULT, status);
1315 if (U_SUCCESS(status)) {
1333 UErrorCode status = U_ZERO_ERROR;
1335 status);
1336 if (U_FAILURE(status)) {
1337 errln("Error opening string search %s", u_errorName(status));
1347 while (U_SUCCESS(status) && matchindex >= 0) {
1349 strsrch->next(status);
1362 status = U_ZERO_ERROR;
1364 if (matchtext.length() != matchlength || U_FAILURE(status)){
1369 status = U_ZERO_ERROR;
1370 strsrch->next(status);
1375 status = U_ZERO_ERROR;
1389 UErrorCode status = U_ZERO_ERROR;
1398 NULL, status);
1399 if (U_FAILURE(status)) {
1400 errln("Error opening string search %s", u_errorName(status));
1412 if (strsrch->first(status) != search.offset[0] || U_FAILURE(status)) {
1415 if (strsrch->last(status) != search.offset[size -1] ||
1416 U_FAILURE(status)) {
1423 if (strsrch->following(search.offset[index + 2] - 1, status)
1424 != search.offset[index + 2] || U_FAILURE(status)) {
1432 status) != search.offset[index + 1] ||
1433 U_FAILURE(status)) {
1440 status = U_ZERO_ERROR;
1441 if (strsrch->following(text.length(), status) != USEARCH_DONE) {
1444 if (strsrch->preceding(0, status) != USEARCH_DONE) {
1454 UErrorCode status = U_ZERO_ERROR;
1458 status);
1459 if (U_FAILURE(status)) {
1460 errln("Error opening string search %s", u_errorName(status));
1466 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
1467 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1468 strsrch->setOffset(9, status);
1469 if (U_FAILURE(status)) {
1480 strsrch->previous(status);
1503 UErrorCode status
1509 getECollationStrength(UCOL_TERTIARY), UCOL_ON, status);
1510 if (U_FAILURE(status)) {
1511 errln("Error opening collator %s", u_errorName(status));
1516 status);
1517 if (U_FAILURE(status)) {
1518 errln("Error opening string search %s", u_errorName(status));
1527 strsrch->setText(text, status);
1528 strsrch->setPattern(pattern, status);
1544 UErrorCode status = U_ZERO_ERROR;
1548 UCOL_ON, status);
1549 if (U_FAILURE(status)) {
1550 errln("Error opening collator %s", u_errorName(status));
1556 status);
1557 if (U_FAILURE(status)) {
1558 errln("Error opening string search %s", u_errorName(status));
1568 strsrch->setText(text, status);
1569 strsrch->setPattern(pattern, status);
1582 UErrorCode status = U_ZERO_ERROR;
1596 strsrch = new StringSearch(pattern, text, coll, getBreakIterator(search->breaker), status);
1597 if (U_FAILURE(status)) {
1598 errln("Error opening string search %s", u_errorName(status));
1605 strsrch->setText(text, status);
1606 strsrch->setPattern(pattern, status);
1629 UErrorCode status = U_ZERO_ERROR;
1630 m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
1638 m_en_us_->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
1656 UErrorCode status = U_ZERO_ERROR;
1675 breaker, status);
1676 if (U_FAILURE(status)) {
1680 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1681 if (U_FAILURE(status) ||
1699 strsrch->setBreakIterator(breaker, status);
1700 if (U_FAILURE(status) || strsrch->getBreakIterator() != breaker) {
1706 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1729 UErrorCode status = U_ZERO_ERROR;
1730 m_en_us_->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
1731 if (U_FAILURE(status)) {
1733 u_errorName(status));
1743 status);
1768 UErrorCode status = U_ZERO_ERROR;
1778 NULL, status);
1779 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1780 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_ON, status);
1781 if (U_FAILURE(status) ||
1790 strsrch->setAttribute(USEARCH_OVERLAP, USEARCH_OFF, status);
1791 if (U_FAILURE(status) ||
1817 UErrorCode status = U_ZERO_ERROR;
1819 NULL, status);
1820 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1821 if (U_FAILURE(status)) {
1822 errln("Error opening string search %s", u_errorName(status));
1834 UCOL_ON, status);
1836 if (U_FAILURE(status)) {
1837 errln("Error opening rule based collator %s", u_errorName(status));
1840 strsrch->setCollator(tailored, status);
1841 if (U_FAILURE(status) || *(strsrch->getCollator()) != *tailored) {
1845 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1855 strsrch->setCollator(m_en_us_, status);
1857 if (U_FAILURE(status) || *(strsrch->getCollator()) != *m_en_us_) {
1883 UErrorCode status = U_ZERO_ERROR;
1885 status);
1886 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1887 if (U_FAILURE(status)) {
1888 errln("Error opening string search %s", u_errorName(status));
1900 strsrch->setPattern(pattern, status);
1906 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1907 if (U_FAILURE(status)) {
1908 errln("Error setting pattern %s", u_errorName(status));
1916 strsrch->setPattern(pattern, status);
1922 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1923 if (U_FAILURE(status)) {
1924 errln("Error setting pattern %s", u_errorName(status));
1946 UErrorCode status = U_ZERO_ERROR;
1948 status);
1949 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
1951 if (U_FAILURE(status)) {
1952 errln("Error opening string search %s", u_errorName(status));
1964 strsrch->setText(text, status);
1969 if (U_FAILURE(status)) {
1970 errln("Error setting text %s", u_errorName(status));
1978 strsrch->setText(text, status);
1983 if (U_FAILURE(status)) {
1984 errln("Error setting pattern %s", u_errorName(status));
2010 UErrorCode status = U_ZERO_ERROR;
2014 status);
2017 collator->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
2019 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
2021 strsrch->setOffset(-1, status);
2022 if (U_SUCCESS(status)) {
2025 strsrch->setOffset(128, status);
2026 if (U_SUCCESS(status)) {
2043 UErrorCode status = U_ZERO_ERROR;
2044 strsrch->setText(text, status);
2046 strsrch->setPattern(pattern, status);
2050 while (U_SUCCESS(status) && matchindex >= 0) {
2052 strsrch->next(status);
2067 strsrch->setOffset(search.offset[count + 1] + 1, status);
2076 strsrch->next(status);
2089 collator->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, status);
2112 UErrorCode status = U_ZERO_ERROR;
2114 getECollationStrength(UCOL_TERTIARY), UCOL_ON, status);
2115 if (U_FAILURE(status)) {
2116 errln("Error opening collator %s", u_errorName(status));
2121 status);
2122 strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
2123 if (U_FAILURE(status)) {
2124 errln("Error opening string search %s", u_errorName(status));
2133 strsrch->setText(text, status);
2134 strsrch->setPattern(pattern, status);
2151 UErrorCode status = U_ZERO_ERROR;
2155 status);
2172 void setOffset(int32_t position, UErrorCode &status);
2196 int32_t handleNext(int32_t position, UErrorCode &status);
2197 int32_t handlePrev(int32_t position, UErrorCode &status);
2234 void TestSearch::setOffset(int32_t position, UErrorCode &status)
2240 status = U_INDEX_OUTOFBOUNDS_ERROR;
2262 int32_t TestSearch::handleNext(int32_t start, UErrorCode &status)
2264 if(U_SUCCESS(status)) {
2281 int32_t TestSearch::handlePrev(int32_t start, UErrorCode &status)
2283 if(U_SUCCESS(status)) {
2315 UErrorCode status = U_ZERO_ERROR;
2319 search.setText(text, status);
2324 search.setText(chariter, status);
2333 if (search.next(status) != expected[i]) {
2340 if (search.next(status) != USEARCH_DONE) {
2344 if (search.previous(status) != expected[i]) {
2351 if (search.previous(status) != USEARCH_DONE) {
2372 UErrorCode status = U_ZERO_ERROR;
2378 stub2.setText(UnicodeString("ABC"), status);
2379 if (U_FAILURE(status)) {