mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-2840 test updates (dont crash without data)
X-SVN-Rev: 12306
This commit is contained in:
parent
ec21353ba5
commit
ee995c2d81
3 changed files with 14 additions and 3 deletions
|
@ -58,6 +58,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
|
|||
DecimalFormat def(status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln((UnicodeString)"ERROR: Could not create DecimalFormat (default)");
|
||||
return;
|
||||
}
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
|
@ -65,12 +66,14 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
|
|||
DecimalFormat pat(pattern, status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern)");
|
||||
return;
|
||||
}
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
DecimalFormatSymbols *symbols = new DecimalFormatSymbols(Locale::getFrench(), status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln((UnicodeString)"ERROR: Could not create DecimalFormatSymbols (French)");
|
||||
return;
|
||||
}
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
|
@ -341,7 +344,8 @@ void IntlTestDecimalFormatAPI::testRounding(/*char *par*/)
|
|||
};
|
||||
DecimalFormat pat(status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln((UnicodeString)"ERROR: Could not create DecimalFormat (default)");
|
||||
errln((UnicodeString)"ERROR: Could not create DecimalFormat (default)");
|
||||
return;
|
||||
}
|
||||
uint16_t mode;
|
||||
uint16_t i=0;
|
||||
|
|
|
@ -268,6 +268,13 @@ void IntlCalendarTest::TestBuddhist() {
|
|||
-540, // G. year
|
||||
UCAL_FEBRUARY, // month
|
||||
12, // day
|
||||
|
||||
0, // test month calculation: 4795 BE = 4252 AD is a leap year, but 4795 AD is not.
|
||||
4795, // BE
|
||||
4252, // AD
|
||||
UCAL_FEBRUARY,
|
||||
29,
|
||||
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
Calendar *cal;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
|
|
@ -68,13 +68,13 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */)
|
|||
|
||||
DateFormatSymbols fr(Locale::getFrench(), status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln("ERROR: Couldn't create French DateFormatSymbols");
|
||||
errln("ERROR: Couldn't create French DateFormatSymbols " + (UnicodeString)u_errorName(status));
|
||||
}
|
||||
|
||||
status = U_ZERO_ERROR;
|
||||
DateFormatSymbols en(Locale::getEnglish(), status);
|
||||
if(U_FAILURE(status)) {
|
||||
errln("ERROR: Couldn't create English DateFormatSymbols");
|
||||
errln("ERROR: Couldn't create English DateFormatSymbols " + (UnicodeString)u_errorName(status));
|
||||
}
|
||||
|
||||
if(en == fr || ! (en != fr) ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue