ICU-2840 don't crash if there is no data

X-SVN-Rev: 12308
This commit is contained in:
Steven R. Loomis 2003-06-05 00:15:15 +00:00
parent ad141400ac
commit 86a7753f88

View file

@ -85,9 +85,14 @@ void IntlTestDateFormatSymbols::testSymbols(/* char *par */)
int32_t count = 0;
const UnicodeString *eras = en.getEras(count);
if(count == 0) {
errln("ERROR: 0 english eras.. exitting..\n");
return;
}
fr.setEras(eras, count);
if( *en.getEras(count) != *fr.getEras(count)) {
errln("ERROR: setEras() failed");
errln("ERROR: setEras() failed");
}
const UnicodeString *months = en.getMonths(count);