ICU-4902 minor test enhancements

X-SVN-Rev: 18734
This commit is contained in:
Doug Felt 2005-10-28 18:29:37 +00:00
parent 6789e15b2c
commit 118ac3b3ea
2 changed files with 4 additions and 3 deletions

View File

@ -263,7 +263,7 @@ public class CopticTest extends CalendarTest
};
String[] formatLocales = {
"en", "am", "gez", "ti"
"en", "am", "am_ET", "gez", "ti"
};
for (int i = 0; i < calendarLocales.length; ++i) {
String calLocName = calendarLocales[i];

View File

@ -815,19 +815,20 @@ public class IBMCalendarTest extends CalendarTest {
final Date time = new Date();
for (int i = 0; i < calTypes.length; ++i) {
ULocale aLoc = loc.setKeywordValue("calendar", calTypes[i]);
logln("key: " + aLoc.getDisplayKeyword("calendar") + " val: " + aLoc.getDisplayKeywordValue("calendar"));
logln("locale: " + aLoc);
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL,
DateFormat.FULL,
aLoc);
logln("df type: " + df.getClass().getName());
logln("df type: " + df.getClass().getName() + " loc: " + df.getLocale(ULocale.VALID_LOCALE));
Calendar cal = df.getCalendar();
// todo, what about variants of calendars, we have a type for islamic-civil, should we also have a type
// for variants of other calendars?
assertEquals("calendar types", cal.getType(), calTypes[i].equals("islamic-civil") ? "islamic" : calTypes[i]);
DateFormat df2 = cal.getDateTimeFormat(DateFormat.FULL, DateFormat.FULL, ULocale.US);
logln("df2 type: " + df2.getClass().getName() + " loc: " + df2.getLocale(ULocale.VALID_LOCALE));
assertEquals("format results", df.format(time), df2.format(time));
}