mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-9802 Fix no data cintltst and intltest failures
X-SVN-Rev: 33302
This commit is contained in:
parent
339177ed3e
commit
795b21007f
4 changed files with 17 additions and 5 deletions
|
@ -334,6 +334,9 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
|
|||
|
||||
fTimeZoneNames = TimeZoneNames::createInstance(locale, status);
|
||||
// fTimeZoneGenericNames is lazily instantiated
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const UChar* gmtPattern = NULL;
|
||||
const UChar* hourFormats = NULL;
|
||||
|
|
|
@ -85,7 +85,7 @@ static void initializeStatics() {
|
|||
gNfdNormalizer = Normalizer2::getNFDInstance(status);
|
||||
}
|
||||
ucln_i18n_registerCleanup(UCLN_I18N_SPOOF, uspoof_cleanup);
|
||||
U_ASSERT(U_SUCCESS(status)); // TODO: remove after testing.
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -545,6 +545,11 @@ void AlphabeticIndexTest::TestHaniFirst() {
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
LocalPointer<RuleBasedCollator> coll(
|
||||
static_cast<RuleBasedCollator *>(Collator::createInstance(Locale::getRoot(), status)));
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln("Failed Collator::createInstance call - %s", u_errorName(status));
|
||||
return;
|
||||
}
|
||||
int32_t reorderCodes[] = { USCRIPT_HAN };
|
||||
coll->setReorderCodes(reorderCodes, LENGTHOF(reorderCodes), status);
|
||||
TEST_CHECK_STATUS;
|
||||
|
@ -570,6 +575,10 @@ void AlphabeticIndexTest::TestPinyinFirst() {
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
LocalPointer<RuleBasedCollator> coll(
|
||||
static_cast<RuleBasedCollator *>(Collator::createInstance(Locale::getChinese(), status)));
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln("Failed Collator::createInstance call - %s", u_errorName(status));
|
||||
return;
|
||||
}
|
||||
int32_t reorderCodes[] = { USCRIPT_HAN };
|
||||
coll->setReorderCodes(reorderCodes, LENGTHOF(reorderCodes), status);
|
||||
TEST_CHECK_STATUS;
|
||||
|
|
|
@ -32,17 +32,17 @@
|
|||
errcheckln(status, "Failure at file %s, line %d, error = %s", __FILE__, __LINE__, u_errorName(status));}}
|
||||
|
||||
#define TEST_ASSERT(expr) {if ((expr)==FALSE) { \
|
||||
errln("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr);};}
|
||||
errln("Test Failure at file %s, line %d: \"%s\" is false.", __FILE__, __LINE__, #expr);};}
|
||||
|
||||
#define TEST_ASSERT_MSG(expr, msg) {if ((expr)==FALSE) { \
|
||||
errln("Test Failure at file %s, line %d, %s: \"%s\" is false.\n", __FILE__, __LINE__, msg, #expr);};}
|
||||
dataerrln("Test Failure at file %s, line %d, %s: \"%s\" is false.", __FILE__, __LINE__, msg, #expr);};}
|
||||
|
||||
#define TEST_ASSERT_EQ(a, b) { if ((a) != (b)) { \
|
||||
errln("Test Failure at file %s, line %d: \"%s\" (%d) != \"%s\" (%d) \n", \
|
||||
errln("Test Failure at file %s, line %d: \"%s\" (%d) != \"%s\" (%d)", \
|
||||
__FILE__, __LINE__, #a, (a), #b, (b)); }}
|
||||
|
||||
#define TEST_ASSERT_NE(a, b) { if ((a) == (b)) { \
|
||||
errln("Test Failure at file %s, line %d: \"%s\" (%d) == \"%s\" (%d) \n", \
|
||||
errln("Test Failure at file %s, line %d: \"%s\" (%d) == \"%s\" (%d)", \
|
||||
__FILE__, __LINE__, #a, (a), #b, (b)); }}
|
||||
|
||||
#define LENGTHOF(array) ((int32_t)(sizeof(array)/sizeof((array)[0])))
|
||||
|
|
Loading…
Add table
Reference in a new issue