Lines Matching full:status
63 virtual void call(UErrorCode* status);
85 void Strcoll::call(UErrorCode* status) in call() argument
87 if (U_FAILURE(*status)) return; in call()
106 *status = U_INTERNAL_PROGRAM_ERROR; in call()
123 virtual void call(UErrorCode* status);
145 void Strcoll_2::call(UErrorCode* status) in call() argument
147 if (U_FAILURE(*status)) return; in call()
151 *status = U_ILLEGAL_ARGUMENT_ERROR; in call()
175 virtual void call(UErrorCode* status);
197 void StrcollUTF8::call(UErrorCode* status) in call() argument
199 if (U_FAILURE(*status)) return; in call()
205 …for (int32_t i = 0, numTestStringsI = 0; U_SUCCESS(*status) && i < source->count && numTestStrings… in call()
209 …for (int32_t j = 0, numTestStringsJ = 0; U_SUCCESS(*status) && j < source->count && numTestStrings… in call()
213 … cmp += ucol_strcollUTF8(coll, source->dataOf(i), srcLen, source->dataOf(j), tgtLen, status); in call()
218 *status = U_INTERNAL_PROGRAM_ERROR; in call()
235 virtual void call(UErrorCode* status);
257 void StrcollUTF8_2::call(UErrorCode* status) in call() argument
259 if (U_FAILURE(*status)) return; in call()
263 *status = U_ILLEGAL_ARGUMENT_ERROR; in call()
265 for (int32_t i = 0; U_SUCCESS(*status) && i < source->count; i++) { in call()
268 ucol_strcollUTF8(coll, source->dataOf(i), srcLen, target->dataOf(i), tgtLen, status); in call()
286 virtual void call(UErrorCode* status);
308 void GetSortKey::call(UErrorCode* status) in call() argument
310 if (U_FAILURE(*status)) return; in call()
340 virtual void call(UErrorCode* status);
366 void NextSortKeyPart::call(UErrorCode* status) in call() argument
368 if (U_FAILURE(*status)) return; in call()
375 for (int i = 0; i < source->count && U_SUCCESS(*status); i++) { in call()
380 …for (int32_t n = 0; U_SUCCESS(*status) && partLen == bufSize && (maxIteration < 0 || n < maxIterat… in call()
381 partLen = ucol_nextSortKeyPart(coll, &iter, state, part, bufSize, status); in call()
407 virtual void call(UErrorCode* status);
433 void NextSortKeyPartUTF8::call(UErrorCode* status) in call() argument
435 if (U_FAILURE(*status)) return; in call()
442 for (int i = 0; i < source->count && U_SUCCESS(*status); i++) { in call()
447 …for (int32_t n = 0; U_SUCCESS(*status) && partLen == bufSize && (maxIteration < 0 || n < maxIterat… in call()
448 partLen = ucol_nextSortKeyPart(coll, &iter, state, part, bufSize, status); in call()
475 virtual void call(UErrorCode* status);
497 void CppCompare::call(UErrorCode* status) { in call() argument
498 if (U_FAILURE(*status)) return; in call()
517 *status = U_INTERNAL_PROGRAM_ERROR; in call()
534 virtual void call(UErrorCode* status);
556 void CppCompare_2::call(UErrorCode* status) { in call() argument
557 if (U_FAILURE(*status)) return; in call()
561 *status = U_ILLEGAL_ARGUMENT_ERROR; in call()
585 virtual void call(UErrorCode* status);
607 void CppCompareUTF8::call(UErrorCode* status) { in call() argument
608 if (U_FAILURE(*status)) return; in call()
614 …for (int32_t i = 0, numTestStringsI = 0; U_SUCCESS(*status) && i < source->count && numTestStrings… in call()
623 …for (int32_t j = 0, numTestStringsJ = 0; U_SUCCESS(*status) && j < source->count && numTestStrings… in call()
632 cmp += coll->compareUTF8(src, tgt, *status); in call()
637 *status = U_INTERNAL_PROGRAM_ERROR; in call()
655 virtual void call(UErrorCode* status);
677 void CppCompareUTF8_2::call(UErrorCode* status) { in call() argument
678 if (U_FAILURE(*status)) return; in call()
683 *status = U_ILLEGAL_ARGUMENT_ERROR; in call()
685 for (int32_t i = 0; U_SUCCESS(*status) && i < source->count; i++) { in call()
693 coll->compareUTF8(src, tgt, *status); in call()
712 virtual void call(UErrorCode* status);
732 void CppGetCollationKey::call(UErrorCode* status) in call() argument
734 if (U_FAILURE(*status)) return; in call()
737 for (int32_t i = 0; U_SUCCESS(*status) && i < source->count; i++) { in call()
738 coll->getCollationKey(source->dataOf(i), source->lengthOf(i), key, *status); in call()
823 virtual void call(UErrorCode* status);
833 void UniStrSort::call(UErrorCode* status) { in call() argument
834 if (U_FAILURE(*status)) return; in call()
840 UniStrCollatorComparator, &cc, TRUE, status); in call()
913 virtual void call(UErrorCode* status);
918 void StringPieceSortCpp::call(UErrorCode* status) { in call() argument
919 if (U_FAILURE(*status)) return; in call()
925 StringPieceCollatorComparator, &cc, TRUE, status); in call()
937 virtual void call(UErrorCode* status);
942 void StringPieceSortC::call(UErrorCode* status) { in call() argument
943 if (U_FAILURE(*status)) return; in call()
949 StringPieceUCollatorComparator, &cc, TRUE, status); in call()
961 virtual void call(UErrorCode* status);
966 void UniStrBinSearch::call(UErrorCode* status) { in call() argument
967 if (U_FAILURE(*status)) return; in call()
997 virtual void call(UErrorCode* status);
1002 void StringPieceBinSearchCpp::call(UErrorCode* status) { in call() argument
1003 if (U_FAILURE(*status)) return; in call()
1024 virtual void call(UErrorCode* status);
1029 void StringPieceBinSearchC::call(UErrorCode* status) { in call() argument
1030 if (U_FAILURE(*status)) return; in call()
1046 CollPerf2Test(int32_t argc, const char *argv[], UErrorCode &status);
1068 const CA_uchar* getData16(UErrorCode &status);
1069 const CA_char* getData8(UErrorCode &status);
1071 const CA_uchar* getModData16(UErrorCode &status);
1072 const CA_char* getModData8(UErrorCode &status);
1074 const CA_uchar* getSortedData16(UErrorCode &status);
1075 const CA_char* getSortedData8(UErrorCode &status);
1077 const CA_uchar* getRandomData16(UErrorCode &status);
1078 const CA_char* getRandomData8(UErrorCode &status);
1083 UErrorCode &status);
1084 static CA_char* getData8FromData16(const CA_uchar* d16, UErrorCode &status);
1131 CollPerf2Test::CollPerf2Test(int32_t argc, const char *argv[], UErrorCode &status) : in CollPerf2Test() argument
1132 UPerfTest(argc, argv, status), in CollPerf2Test()
1145 if (U_FAILURE(status)) { in CollPerf2Test()
1155 coll = ucol_open(locale, &status); in CollPerf2Test()
1156 collObj = Collator::createInstance(locale, status); in CollPerf2Test()
1176 const CA_uchar* CollPerf2Test::getData16(UErrorCode &status) in getData16() argument
1178 if (U_FAILURE(status)) return NULL; in getData16()
1187 line = ucbuf_readline(ucharBuf, &len, &status); in getData16()
1188 if (line == NULL || U_FAILURE(status)) break; in getData16()
1208 if (U_SUCCESS(status)) { in getData16()
1217 const CA_char* CollPerf2Test::getData8(UErrorCode &status) in getData8() argument
1219 if (U_FAILURE(status)) return NULL; in getData8()
1221 return data8 = getData8FromData16(getData16(status), status); in getData8()
1224 const CA_uchar* CollPerf2Test::getModData16(UErrorCode &status) in getModData16() argument
1226 if (U_FAILURE(status)) return NULL; in getModData16()
1229 const CA_uchar* d16 = getData16(status); in getModData16()
1230 if (U_FAILURE(status)) return NULL; in getModData16()
1259 const CA_char* CollPerf2Test::getModData8(UErrorCode &status) in getModData8() argument
1261 if (U_FAILURE(status)) return NULL; in getModData8()
1263 return modData8 = getData8FromData16(getModData16(status), status); in getModData8()
1298 const CA_uchar* CollPerf2Test::getSortedData16(UErrorCode &status) { in getSortedData16() argument
1299 if (U_FAILURE(status)) return NULL; in getSortedData16()
1302 ArrayAndColl ac(getData16(status), *collObj); in getSortedData16()
1303 return sortedData16 = sortData16(ac.d16, U16CollatorComparator, &ac, status); in getSortedData16()
1306 const CA_char* CollPerf2Test::getSortedData8(UErrorCode &status) { in getSortedData8() argument
1307 if (U_FAILURE(status)) return NULL; in getSortedData8()
1309 return sortedData8 = getData8FromData16(getSortedData16(status), status); in getSortedData8()
1312 const CA_uchar* CollPerf2Test::getRandomData16(UErrorCode &status) { in getRandomData16() argument
1313 if (U_FAILURE(status)) return NULL; in getRandomData16()
1317 const CA_uchar* d16 = getData16(status); in getRandomData16()
1318 return randomData16 = sortData16(d16, U16HashComparator, d16, status); in getRandomData16()
1321 const CA_char* CollPerf2Test::getRandomData8(UErrorCode &status) { in getRandomData8() argument
1322 if (U_FAILURE(status)) return NULL; in getRandomData8()
1324 return randomData8 = getData8FromData16(getRandomData16(status), status); in getRandomData8()
1329 UErrorCode &status) { in sortData16() argument
1330 if (U_FAILURE(status)) return NULL; in sortData16()
1336 uprv_sortArray(indexes.getAlias(), d16->count, 4, cmp, context, TRUE, &status); in sortData16()
1337 if (U_FAILURE(status)) return NULL; in sortData16()
1350 if (U_SUCCESS(status)) { in sortData16()
1357 CA_char* CollPerf2Test::getData8FromData16(const CA_uchar* d16, UErrorCode &status) { in getData8FromData16() argument
1358 if (U_FAILURE(status)) return NULL; in getData8FromData16()
1368 u_strToUTF8(NULL, 0, &length8, s16, length16, &status); in getData8FromData16()
1369 if (status == U_BUFFER_OVERFLOW_ERROR || status == U_ZERO_ERROR){ in getData8FromData16()
1370 status = U_ZERO_ERROR; in getData8FromData16()
1378 u_strToUTF8(d8->last(), capacity8, NULL, s16, length16, &status); in getData8FromData16()
1379 if (U_FAILURE(status)) break; in getData8FromData16()
1382 if (U_SUCCESS(status)) { in getData8FromData16()
1445 UErrorCode status = U_ZERO_ERROR; in TestStrcoll() local
1446 Strcoll *testCase = new Strcoll(coll, getData16(status), TRUE /* useLen */); in TestStrcoll()
1447 if (U_FAILURE(status)) { in TestStrcoll()
1456 UErrorCode status = U_ZERO_ERROR; in TestStrcollNull() local
1457 Strcoll *testCase = new Strcoll(coll, getData16(status), FALSE /* useLen */); in TestStrcollNull()
1458 if (U_FAILURE(status)) { in TestStrcollNull()
1467 UErrorCode status = U_ZERO_ERROR; in TestStrcollSimilar() local
1468 …Strcoll_2 *testCase = new Strcoll_2(coll, getData16(status), getModData16(status), TRUE /* useLen … in TestStrcollSimilar()
1469 if (U_FAILURE(status)) { in TestStrcollSimilar()
1478 UErrorCode status = U_ZERO_ERROR; in TestStrcollUTF8() local
1479 StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status), TRUE /* useLen */); in TestStrcollUTF8()
1480 if (U_FAILURE(status)) { in TestStrcollUTF8()
1489 UErrorCode status = U_ZERO_ERROR; in TestStrcollUTF8Null() local
1490 StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status),FALSE /* useLen */); in TestStrcollUTF8Null()
1491 if (U_FAILURE(status)) { in TestStrcollUTF8Null()
1500 UErrorCode status = U_ZERO_ERROR; in TestStrcollUTF8Similar() local
1501 …StrcollUTF8_2 *testCase = new StrcollUTF8_2(coll, getData8(status), getModData8(status), TRUE /* u… in TestStrcollUTF8Similar()
1502 if (U_FAILURE(status)) { in TestStrcollUTF8Similar()
1511 UErrorCode status = U_ZERO_ERROR; in TestGetSortKey() local
1512 GetSortKey *testCase = new GetSortKey(coll, getData16(status), TRUE /* useLen */); in TestGetSortKey()
1513 if (U_FAILURE(status)) { in TestGetSortKey()
1522 UErrorCode status = U_ZERO_ERROR; in TestGetSortKeyNull() local
1523 GetSortKey *testCase = new GetSortKey(coll, getData16(status), FALSE /* useLen */); in TestGetSortKeyNull()
1524 if (U_FAILURE(status)) { in TestGetSortKeyNull()
1533 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPart_4All() local
1534 NextSortKeyPart *testCase = new NextSortKeyPart(coll, getData16(status), 4 /* bufSize */); in TestNextSortKeyPart_4All()
1535 if (U_FAILURE(status)) { in TestNextSortKeyPart_4All()
1544 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPart_4x4() local
1545 …NextSortKeyPart *testCase = new NextSortKeyPart(coll, getData16(status), 4 /* bufSize */, 4 /* max… in TestNextSortKeyPart_4x4()
1546 if (U_FAILURE(status)) { in TestNextSortKeyPart_4x4()
1555 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPart_4x8() local
1556 …NextSortKeyPart *testCase = new NextSortKeyPart(coll, getData16(status), 4 /* bufSize */, 8 /* max… in TestNextSortKeyPart_4x8()
1557 if (U_FAILURE(status)) { in TestNextSortKeyPart_4x8()
1566 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPart_32All() local
1567 NextSortKeyPart *testCase = new NextSortKeyPart(coll, getData16(status), 32 /* bufSize */); in TestNextSortKeyPart_32All()
1568 if (U_FAILURE(status)) { in TestNextSortKeyPart_32All()
1577 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPart_32x2() local
1578 …NextSortKeyPart *testCase = new NextSortKeyPart(coll, getData16(status), 32 /* bufSize */, 2 /* ma… in TestNextSortKeyPart_32x2()
1579 if (U_FAILURE(status)) { in TestNextSortKeyPart_32x2()
1588 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPartUTF8_4All() local
1589 … NextSortKeyPartUTF8 *testCase = new NextSortKeyPartUTF8(coll, getData8(status), 4 /* bufSize */); in TestNextSortKeyPartUTF8_4All()
1590 if (U_FAILURE(status)) { in TestNextSortKeyPartUTF8_4All()
1599 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPartUTF8_4x4() local
1600 …NextSortKeyPartUTF8 *testCase = new NextSortKeyPartUTF8(coll, getData8(status), 4 /* bufSize */, 4… in TestNextSortKeyPartUTF8_4x4()
1601 if (U_FAILURE(status)) { in TestNextSortKeyPartUTF8_4x4()
1610 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPartUTF8_4x8() local
1611 …NextSortKeyPartUTF8 *testCase = new NextSortKeyPartUTF8(coll, getData8(status), 4 /* bufSize */, 8… in TestNextSortKeyPartUTF8_4x8()
1612 if (U_FAILURE(status)) { in TestNextSortKeyPartUTF8_4x8()
1621 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPartUTF8_32All() local
1622 … NextSortKeyPartUTF8 *testCase = new NextSortKeyPartUTF8(coll, getData8(status), 32 /* bufSize */); in TestNextSortKeyPartUTF8_32All()
1623 if (U_FAILURE(status)) { in TestNextSortKeyPartUTF8_32All()
1632 UErrorCode status = U_ZERO_ERROR; in TestNextSortKeyPartUTF8_32x2() local
1633 …NextSortKeyPartUTF8 *testCase = new NextSortKeyPartUTF8(coll, getData8(status), 32 /* bufSize */, … in TestNextSortKeyPartUTF8_32x2()
1634 if (U_FAILURE(status)) { in TestNextSortKeyPartUTF8_32x2()
1643 UErrorCode status = U_ZERO_ERROR; in TestCppCompare() local
1644 CppCompare *testCase = new CppCompare(collObj, getData16(status), TRUE /* useLen */); in TestCppCompare()
1645 if (U_FAILURE(status)) { in TestCppCompare()
1654 UErrorCode status = U_ZERO_ERROR; in TestCppCompareNull() local
1655 CppCompare *testCase = new CppCompare(collObj, getData16(status), FALSE /* useLen */); in TestCppCompareNull()
1656 if (U_FAILURE(status)) { in TestCppCompareNull()
1665 UErrorCode status = U_ZERO_ERROR; in TestCppCompareSimilar() local
1666 …CppCompare_2 *testCase = new CppCompare_2(collObj, getData16(status), getModData16(status), TRUE /… in TestCppCompareSimilar()
1667 if (U_FAILURE(status)) { in TestCppCompareSimilar()
1676 UErrorCode status = U_ZERO_ERROR; in TestCppCompareUTF8() local
1677 CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), TRUE /* useLen */); in TestCppCompareUTF8()
1678 if (U_FAILURE(status)) { in TestCppCompareUTF8()
1687 UErrorCode status = U_ZERO_ERROR; in TestCppCompareUTF8Null() local
1688 CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), FALSE /* useLen */); in TestCppCompareUTF8Null()
1689 if (U_FAILURE(status)) { in TestCppCompareUTF8Null()
1698 UErrorCode status = U_ZERO_ERROR; in TestCppCompareUTF8Similar() local
1699 …CppCompareUTF8_2 *testCase = new CppCompareUTF8_2(collObj, getData8(status), getModData8(status), … in TestCppCompareUTF8Similar()
1700 if (U_FAILURE(status)) { in TestCppCompareUTF8Similar()
1709 UErrorCode status = U_ZERO_ERROR; in TestCppGetCollationKey() local
1710 …CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), TRUE /* useLen *… in TestCppGetCollationKey()
1711 if (U_FAILURE(status)) { in TestCppGetCollationKey()
1720 UErrorCode status = U_ZERO_ERROR; in TestCppGetCollationKeyNull() local
1721 …CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), FALSE /* useLen … in TestCppGetCollationKeyNull()
1722 if (U_FAILURE(status)) { in TestCppGetCollationKeyNull()
1730 UErrorCode status = U_ZERO_ERROR; in TestUniStrSort() local
1731 UPerfFunction *testCase = new UniStrSort(*collObj, coll, getRandomData16(status)); in TestUniStrSort()
1732 if (U_FAILURE(status)) { in TestUniStrSort()
1740 UErrorCode status = U_ZERO_ERROR; in TestStringPieceSortCpp() local
1741 UPerfFunction *testCase = new StringPieceSortCpp(*collObj, coll, getRandomData8(status)); in TestStringPieceSortCpp()
1742 if (U_FAILURE(status)) { in TestStringPieceSortCpp()
1750 UErrorCode status = U_ZERO_ERROR; in TestStringPieceSortC() local
1751 UPerfFunction *testCase = new StringPieceSortC(*collObj, coll, getRandomData8(status)); in TestStringPieceSortC()
1752 if (U_FAILURE(status)) { in TestStringPieceSortC()
1760 UErrorCode status = U_ZERO_ERROR; in TestUniStrBinSearch() local
1761 UPerfFunction *testCase = new UniStrBinSearch(*collObj, coll, getSortedData16(status)); in TestUniStrBinSearch()
1762 if (U_FAILURE(status)) { in TestUniStrBinSearch()
1770 UErrorCode status = U_ZERO_ERROR; in TestStringPieceBinSearchCpp() local
1771 UPerfFunction *testCase = new StringPieceBinSearchCpp(*collObj, coll, getSortedData8(status)); in TestStringPieceBinSearchCpp()
1772 if (U_FAILURE(status)) { in TestStringPieceBinSearchCpp()
1780 UErrorCode status = U_ZERO_ERROR; in TestStringPieceBinSearchC() local
1781 UPerfFunction *testCase = new StringPieceBinSearchC(*collObj, coll, getSortedData8(status)); in TestStringPieceBinSearchC()
1782 if (U_FAILURE(status)) { in TestStringPieceBinSearchC()
1792 UErrorCode status = U_ZERO_ERROR; in main() local
1793 CollPerf2Test test(argc, argv, status); in main()
1795 if (U_FAILURE(status)){ in main()
1796 printf("The error is %s\n", u_errorName(status)); in main()
1798 return status; in main()