mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-8146 Add check for data loading failure in cintltst and intltest.
X-SVN-Rev: 29025
This commit is contained in:
parent
469d4035bd
commit
b21e2734dd
4 changed files with 15 additions and 8 deletions
|
@ -807,7 +807,7 @@ static void TestBreakIteratorTailoring(void) {
|
|||
|
||||
ubrk_close(ubrkiter);
|
||||
} else {
|
||||
log_err("FAIL: locale %s, break type %d, ubrk_open status %d\n", testPtr->locale, testPtr->type, status);
|
||||
log_err_status(status, "FAIL: locale %s, break type %d, ubrk_open status: %s\n", testPtr->locale, testPtr->type, u_errorName(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1441,7 +1441,7 @@ static void RamsRulesTest(void) {
|
|||
testCEs(coll, &status);
|
||||
ucol_close(coll);
|
||||
} else {
|
||||
log_err("Could not test rule: %s: '%s'\n", u_errorName(status), rulesToTest[i]);
|
||||
log_err_status(status, "Could not test rule: %s: '%s'\n", u_errorName(status), rulesToTest[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5909,7 +5909,6 @@ static void TestBeforeRuleWithScriptReordering(void)
|
|||
*/
|
||||
static void TestNonLeadBytesDuringCollationReordering(void)
|
||||
{
|
||||
UParseError error;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollator *myCollation;
|
||||
int32_t reorderCodes[1] = {USCRIPT_GREEK};
|
||||
|
@ -5991,7 +5990,6 @@ static void TestNonLeadBytesDuringCollationReordering(void)
|
|||
*/
|
||||
static void TestReorderingAPI(void)
|
||||
{
|
||||
UParseError error;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollator *myCollation;
|
||||
int32_t reorderCodes[3] = {USCRIPT_GREEK, USCRIPT_HAN, UCOL_REORDER_CODE_PUNCTUATION};
|
||||
|
@ -6068,8 +6066,6 @@ static void doTestOneReorderingAPITestCase(const OneTestCase testCases[], uint32
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollator *myCollation;
|
||||
|
||||
int i;
|
||||
|
||||
for (testCaseNum = 0; testCaseNum < testCasesLen; ++testCaseNum) {
|
||||
myCollation = ucol_open("", &status);
|
||||
if (U_FAILURE(status)) {
|
||||
|
@ -6240,6 +6236,11 @@ static void TestImport(void)
|
|||
|
||||
|
||||
vicoll = ucol_open("vi", &status);
|
||||
if(U_FAILURE(status)){
|
||||
log_err_status(status, "ERROR: Call ucol_open(\"vi\", ...): %s\n", myErrorName(status));
|
||||
return;
|
||||
}
|
||||
|
||||
virules = (UChar*) ucol_getRules(vicoll, &viruleslength);
|
||||
escoll = ucol_open("es", &status);
|
||||
esrules = (UChar*) ucol_getRules(escoll, &esruleslength);
|
||||
|
|
|
@ -1454,6 +1454,10 @@ void
|
|||
BasicNormalizerTest::TestFilteredNormalizer2Coverage() {
|
||||
UErrorCode errorCode = U_ZERO_ERROR;
|
||||
const Normalizer2 *nfcNorm2=Normalizer2Factory::getNFCInstance(errorCode);
|
||||
if (U_FAILURE(errorCode)) {
|
||||
dataerrln("Normalizer2Factory::getNFCInstance() call failed - %s", u_errorName(status));
|
||||
return;
|
||||
}
|
||||
UnicodeSet filter(UNICODE_STRING_SIMPLE("[^\\u00a0-\\u00ff]"), errorCode);
|
||||
UnicodeString newString1 = UNICODE_STRING_SIMPLE("[^\\u0100-\\u01ff]");
|
||||
UnicodeString newString2 = UNICODE_STRING_SIMPLE("[^\\u0200-\\u02ff]");
|
||||
|
|
|
@ -271,7 +271,8 @@ void TimeUnitTest::testGreek() {
|
|||
++unitIndex ) {
|
||||
|
||||
TimeUnitAmount *tamt = new TimeUnitAmount(numbers[numberIndex], tunits[unitIndex], status);
|
||||
if (!assertSuccess("generating TimeUnitAmount Object failed", status)) {
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln("generating TimeUnitAmount Object failed.");
|
||||
#ifdef TUFMTTS_DEBUG
|
||||
std::cout << "Failed to get TimeUnitAmount for " << tunits[unitIndex] << "\n";
|
||||
#endif
|
||||
|
@ -279,7 +280,8 @@ void TimeUnitTest::testGreek() {
|
|||
}
|
||||
|
||||
TimeUnitFormat *tfmt = new TimeUnitFormat(l, styles[styleIndex], status);
|
||||
if (!assertSuccess("generating TimeUnitFormat Object failed", status)) {
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln("generating TimeUnitAmount Object failed.");
|
||||
#ifdef TUFMTTS_DEBUG
|
||||
std::cout << "Failed to get TimeUnitFormat for " << locales[locIndex] << "\n";
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue