2 *******************************************************************************
3 * Copyright (C) 1996-2013, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
9 package com.ibm.icu.dev.test.serializable;
11 import java.util.Date;
12 import java.util.HashMap;
13 import java.util.Locale;
15 import com.ibm.icu.dev.test.TestFmwk;
16 import com.ibm.icu.dev.test.format.MeasureUnitTest;
17 import com.ibm.icu.dev.test.format.PluralRulesTest;
18 import com.ibm.icu.impl.JavaTimeZone;
19 import com.ibm.icu.impl.OlsonTimeZone;
20 import com.ibm.icu.impl.TimeZoneAdapter;
21 import com.ibm.icu.math.BigDecimal;
22 import com.ibm.icu.math.MathContext;
23 import com.ibm.icu.util.AnnualTimeZoneRule;
24 import com.ibm.icu.util.Calendar;
25 import com.ibm.icu.util.Currency;
26 import com.ibm.icu.util.DateInterval;
27 import com.ibm.icu.util.DateTimeRule;
28 import com.ibm.icu.util.GregorianCalendar;
29 import com.ibm.icu.util.InitialTimeZoneRule;
30 import com.ibm.icu.util.RuleBasedTimeZone;
31 import com.ibm.icu.util.SimpleTimeZone;
32 import com.ibm.icu.util.TimeArrayTimeZoneRule;
33 import com.ibm.icu.util.TimeZone;
34 import com.ibm.icu.util.TimeZoneRule;
35 import com.ibm.icu.util.ULocale;
36 import com.ibm.icu.util.VTimeZone;
41 * TODO To change the template for this generated type comment go to
42 * Window - Preferences - Java - Code Style - Code Templates
44 public class SerializableTest extends TestFmwk.TestGroup
46 public interface Handler
48 public Object[] getTestObjects();
50 public boolean hasSameBehavior(Object a, Object b);
53 public static Handler getHandler(String className)
55 return (Handler) map.get(className);
58 private static class TimeZoneHandler implements Handler
60 String[] ZONES = { "GMT", "MET", "IST" };
62 public Object[] getTestObjects()
64 TimeZone zones[] = new TimeZone[ZONES.length];
66 for(int z = 0; z < ZONES.length; z += 1) {
67 zones[z] = TimeZone.getTimeZone(ZONES[z]);
73 public boolean hasSameBehavior(Object a, Object b)
75 TimeZone zone_a = (TimeZone) a;
76 TimeZone zone_b = (TimeZone) b;
78 if (!(zone_a.getDisplayName().equals(zone_b.getDisplayName()))) {
82 int a_offsets[] = {0, 0};
83 int b_offsets[] = {0, 0};
86 for (int i = 0; i < sampleTimes.length; i++) {
87 zone_a.getOffset(sampleTimes[i], false, a_offsets);
88 zone_b.getOffset(sampleTimes[i], false, b_offsets);
89 if (a_offsets[0] != b_offsets[0] || a_offsets[1] != b_offsets[1]) {
98 private static Locale locales[] = {
99 Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA,
100 Locale.CHINESE, Locale.ENGLISH, Locale.FRANCE, Locale.FRENCH,
101 Locale.GERMAN, Locale.GERMANY, Locale.ITALIAN, Locale.ITALY,
102 Locale.JAPAN, Locale.JAPANESE, Locale.KOREA, Locale.KOREAN,
103 Locale.PRC, Locale.SIMPLIFIED_CHINESE, Locale.TAIWAN,
104 Locale.TRADITIONAL_CHINESE, Locale.UK, Locale.US
107 private static Locale places[] = {
108 Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA,
109 Locale.FRANCE, Locale.GERMANY, Locale.ITALY,
110 Locale.JAPAN, Locale.KOREA, Locale.PRC, Locale.TAIWAN,
114 public static Locale[] getLocales()
119 public static boolean compareStrings(String a[], String b[])
121 if (a.length != b.length) {
125 for (int i = 0; i < a.length; i += 1) {
126 if (! a[i].equals(b[i])) {
134 public static boolean compareChars(char a[], char b[])
136 if (a.length != b.length) {
140 for (int i = 0; i < a.length; i += 1) {
149 private static class SimpleTimeZoneHandler extends TimeZoneHandler
151 public Object[] getTestObjects()
153 SimpleTimeZone simpleTimeZones[] = new SimpleTimeZone[6];
155 simpleTimeZones[0] = new SimpleTimeZone(32400000, "MyTimeZone");
157 simpleTimeZones[1] = new SimpleTimeZone(32400000, "Asia/Tokyo");
159 simpleTimeZones[2] = new SimpleTimeZone(32400000, "Asia/Tokyo");
160 simpleTimeZones[2].setRawOffset(0);
162 simpleTimeZones[3] = new SimpleTimeZone(32400000, "Asia/Tokyo");
163 simpleTimeZones[3].setStartYear(100);
165 simpleTimeZones[4] = new SimpleTimeZone(32400000, "Asia/Tokyo");
166 simpleTimeZones[4].setStartYear(1000);
167 simpleTimeZones[4].setDSTSavings(1800000);
168 simpleTimeZones[4].setStartRule(3, 4, 180000);
169 simpleTimeZones[4].setEndRule(6, 3, 4, 360000);
171 simpleTimeZones[5] = new SimpleTimeZone(32400000, "Asia/Tokyo");
172 simpleTimeZones[5].setStartRule(2, 3, 4, 360000);
173 simpleTimeZones[5].setEndRule(6, 3, 4, 360000);
175 return simpleTimeZones;
179 private static class VTimeZoneHandler extends TimeZoneHandler {
180 public Object[] getTestObjects() {
182 VTimeZone[] vtzs = new VTimeZone[1];
183 vtzs[0] = VTimeZone.create("America/New_York");
188 private static final int HOUR = 60*60*1000;
189 private static final AnnualTimeZoneRule[] TEST_US_EASTERN = {
190 new AnnualTimeZoneRule("EST", -5*HOUR, 0,
191 new DateTimeRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2*HOUR, DateTimeRule.WALL_TIME),
194 new AnnualTimeZoneRule("EST", -5*HOUR, 0,
195 new DateTimeRule(Calendar.NOVEMBER, 1, Calendar.SUNDAY, true, 2*HOUR, DateTimeRule.WALL_TIME),
196 2007, AnnualTimeZoneRule.MAX_YEAR),
198 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
199 new DateTimeRule(Calendar.APRIL, -1, Calendar.SUNDAY, 2*HOUR, DateTimeRule.WALL_TIME),
202 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
203 new DateTimeRule(Calendar.JANUARY, 6, 2*HOUR, DateTimeRule.WALL_TIME),
206 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
207 new DateTimeRule(Calendar.FEBRUARY, 23, 2*HOUR, DateTimeRule.WALL_TIME),
210 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
211 new DateTimeRule(Calendar.APRIL, -1, Calendar.SUNDAY, 2*HOUR, DateTimeRule.WALL_TIME),
214 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
215 new DateTimeRule(Calendar.APRIL, 1, Calendar.SUNDAY, true, 2*HOUR, DateTimeRule.WALL_TIME),
218 new AnnualTimeZoneRule("EDT", -5*HOUR, 1*HOUR,
219 new DateTimeRule(Calendar.MARCH, 8, Calendar.SUNDAY, true, 2*HOUR, DateTimeRule.WALL_TIME),
220 2007, AnnualTimeZoneRule.MAX_YEAR)
225 private static class RuleBasedTimeZoneHandler extends TimeZoneHandler
227 public Object[] getTestObjects()
229 RuleBasedTimeZone ruleBasedTimeZones[] = new RuleBasedTimeZone[2];
231 InitialTimeZoneRule ir = new InitialTimeZoneRule("GMT-5", -5*HOUR, 0);
233 // GMT-5, no transition
234 ruleBasedTimeZones[0] = new RuleBasedTimeZone("GMT-5", ir);
237 // US Eastern since 1967
238 ruleBasedTimeZones[1] = new RuleBasedTimeZone("US_East", ir);
239 for (int i = 0; i < TEST_US_EASTERN.length; i++) {
240 ruleBasedTimeZones[1].addTransitionRule(TEST_US_EASTERN[i]);
242 return ruleBasedTimeZones;
246 private static class DateTimeRuleHandler implements Handler {
247 public Object[] getTestObjects() {
248 DateTimeRule[] rules = new DateTimeRule[4];
251 rules[0] = new DateTimeRule(Calendar.OCTOBER, 10, 13*HOUR, DateTimeRule.UTC_TIME);
254 rules[1] = new DateTimeRule(Calendar.MARCH, 2, Calendar.SUNDAY, 2*HOUR, DateTimeRule.WALL_TIME);
257 rules[2] = new DateTimeRule(Calendar.MAY, 1, Calendar.MONDAY, true, 0*HOUR, DateTimeRule.STANDARD_TIME);
259 // DOW_LEQ_DOM + WALL
260 rules[3] = new DateTimeRule(Calendar.AUGUST, 31, Calendar.SATURDAY, false, 1*HOUR, DateTimeRule.WALL_TIME);
265 public boolean hasSameBehavior(Object a, Object b) {
266 return hasSameRule((DateTimeRule)a, (DateTimeRule)b);
269 static boolean hasSameRule(DateTimeRule dtra, DateTimeRule dtrb) {
270 boolean bSame = false;
271 if (dtra.getDateRuleType() == dtrb.getDateRuleType()
272 && dtra.getRuleMonth() == dtrb.getRuleMonth()
273 && dtra.getTimeRuleType() == dtrb.getTimeRuleType()
274 && dtra.getRuleMillisInDay() == dtrb.getRuleMillisInDay()) {
275 switch (dtra.getDateRuleType()) {
276 case DateTimeRule.DOM:
277 bSame = (dtra.getRuleDayOfMonth() == dtrb.getRuleDayOfMonth());
279 case DateTimeRule.DOW:
280 bSame = (dtra.getRuleDayOfWeek() == dtrb.getRuleDayOfWeek() &&
281 dtra.getRuleWeekInMonth() == dtrb.getRuleWeekInMonth());
283 case DateTimeRule.DOW_GEQ_DOM:
284 case DateTimeRule.DOW_LEQ_DOM:
285 bSame = (dtra.getRuleDayOfMonth() == dtrb.getRuleDayOfMonth() &&
286 dtra.getRuleDayOfWeek() == dtrb.getRuleDayOfWeek());
294 private static boolean compareTimeZoneRules(TimeZoneRule ra, TimeZoneRule rb) {
295 if (ra.getName().equals(rb.getName()) &&
296 ra.getRawOffset() == rb.getRawOffset() &&
297 ra.getDSTSavings() == rb.getDSTSavings()) {
303 private static class AnnualTimeZoneRuleHandler implements Handler {
304 public Object[] getTestObjects() {
305 return TEST_US_EASTERN;
308 public boolean hasSameBehavior(Object a, Object b) {
309 AnnualTimeZoneRule ra = (AnnualTimeZoneRule)a;
310 AnnualTimeZoneRule rb = (AnnualTimeZoneRule)b;
311 if (DateTimeRuleHandler.hasSameRule(ra.getRule(), rb.getRule()) &&
312 ra.getStartYear() == rb.getStartYear() &&
313 ra.getEndYear() == rb.getEndYear()) {
314 return compareTimeZoneRules(ra, rb);
320 private static class InitialTimeZoneRuleHandler implements Handler {
321 public Object[] getTestObjects() {
322 TimeZoneRule[] rules = new TimeZoneRule[2];
323 rules[0] = new InitialTimeZoneRule("EST", -5*HOUR, 0);
324 rules[1] = new InitialTimeZoneRule("PST", -8*HOUR, 0);
328 public boolean hasSameBehavior(Object a, Object b) {
329 return compareTimeZoneRules((TimeZoneRule)a, (TimeZoneRule)b);
333 private static class TimeArrayTimeZoneRuleHandler implements Handler {
334 public Object[] getTestObjects() {
335 TimeArrayTimeZoneRule[] rules = new TimeArrayTimeZoneRule[1];
336 long[] ttime = new long[] {-631152000000L, 0L, 946684800000L}; /* {1950-1-1, 1970-1-1, 2000-1-1} */
337 rules[0] = new TimeArrayTimeZoneRule("Foo", 1*HOUR, 1*HOUR, ttime, DateTimeRule.UTC_TIME);
341 public boolean hasSameBehavior(Object a, Object b) {
342 TimeArrayTimeZoneRule ra = (TimeArrayTimeZoneRule)a;
343 TimeArrayTimeZoneRule rb = (TimeArrayTimeZoneRule)b;
345 Date da = ra.getFirstStart(0, 0);
346 Date db = rb.getFirstStart(0, 0);
347 long t = da.getTime();
349 da = ra.getFinalStart(0, 0);
350 db = rb.getFinalStart(0, 0);
351 long end = da.getTime();
354 da = ra.getNextStart(t, 0, 0, false);
355 db = ra.getNextStart(t, 0, 0, false);
356 if (da == null || db == null || !da.equals(db)) {
361 return compareTimeZoneRules(ra, rb);
368 private static class ULocaleHandler implements Handler
370 public Object[] getTestObjects()
372 ULocale uLocales[] = new ULocale[locales.length];
374 for (int i = 0; i < locales.length; i += 1) {
375 uLocales[i] = ULocale.forLocale(locales[i]);
381 public boolean hasSameBehavior(Object a, Object b)
383 ULocale uloc_a = (ULocale) a;
384 ULocale uloc_b = (ULocale) b;
386 return uloc_a.getName().equals(uloc_b.getName());
390 public static class DateIntervalHandler implements Handler
392 private DateInterval dateInterval[] = {
393 new DateInterval(0L, 1164931200000L/*20061201T000000Z*/)
395 public Object[] getTestObjects()
400 public boolean hasSameBehavior(Object a, Object b)
407 private static class CurrencyHandler implements Handler
409 public Object[] getTestObjects()
411 Currency currencies[] = new Currency[places.length];
413 for (int i = 0; i < places.length; i += 1) {
414 currencies[i] = Currency.getInstance(places[i]);
420 public boolean hasSameBehavior(Object a, Object b)
423 Currency curr_a = (Currency) a;
424 Currency curr_b = (Currency) b;
427 || a != null && b != null
428 && curr_a.getCurrencyCode() != null
429 && curr_a.getCurrencyCode().equals(curr_b.getCurrencyCode());
434 private static String zoneIDs[] = {
435 "Pacific/Honolulu", "America/Anchorage", "America/Los_Angeles", "America/Denver",
436 "America/Chicago", "America/New_York", "Africa/Cairo", "Africa/Addis_Ababa", "Africa/Dar_es_Salaam",
437 "Africa/Freetown", "Africa/Johannesburg", "Africa/Nairobi", "Asia/Bangkok", "Asia/Baghdad",
438 "Asia/Calcutta", "Asia/Hong_Kong", "Asia/Jakarta", "Asia/Jerusalem", "Asia/Manila", "Asia/Tokyo",
439 "Europe/Amsterdam", "Europe/Athens", "Europe/Berlin", "Europe/London", "Europe/Malta", "Europe/Moscow",
440 "Europe/Paris", "Europe/Rome"
443 private static long sampleTimes[] = {
444 1136073600000L, // 20060101T000000Z
445 1138752000000L, // 20060201T000000Z
446 1141171200000L, // 20060301T000000Z
447 1143849600000L, // 20060401T000000Z
448 1146441600000L, // 20060501T000000Z
449 1149120000000L, // 20060601T000000Z
450 1151712000000L, // 20060701T000000Z
451 1154390400000L, // 20060801T000000Z
452 1157068800000L, // 20060901T000000Z
453 1159660800000L, // 20061001T000000Z
454 1162339200000L, // 20061101T000000Z
455 1164931200000L, // 20061201T000000Z
458 private static class OlsonTimeZoneHandler implements Handler
460 public Object[] getTestObjects()
462 OlsonTimeZone timeZones[] = new OlsonTimeZone[zoneIDs.length];
464 for (int i = 0; i < zoneIDs.length; i += 1) {
465 timeZones[i] = new OlsonTimeZone(zoneIDs[i]);
472 public boolean hasSameBehavior(Object a, Object b)
474 OlsonTimeZone otz_a = (OlsonTimeZone) a;
475 OlsonTimeZone otz_b = (OlsonTimeZone) b;
476 int a_offsets[] = {0, 0};
477 int b_offsets[] = {0, 0};
479 boolean bSame = true;
480 for (int i = 0; i < sampleTimes.length; i++) {
481 otz_a.getOffset(sampleTimes[i], false, a_offsets);
482 otz_b.getOffset(sampleTimes[i], false, b_offsets);
483 if (a_offsets[0] != b_offsets[0] || a_offsets[1] != b_offsets[1]) {
492 private static class TimeZoneAdapterHandler implements Handler
494 public Object[] getTestObjects()
496 TimeZoneAdapter timeZones[] = new TimeZoneAdapter[zoneIDs.length];
498 for (int i = 0; i < zoneIDs.length; i += 1) {
499 timeZones[i] = new TimeZoneAdapter(TimeZone.getTimeZone(zoneIDs[i]));
506 public boolean hasSameBehavior(Object a, Object b)
508 GregorianCalendar cal = new GregorianCalendar();
509 TimeZoneAdapter tza_a = (TimeZoneAdapter) a;
510 TimeZoneAdapter tza_b = (TimeZoneAdapter) b;
512 int a_offset, b_offset;
513 boolean a_dst, b_dst;
514 boolean bSame = true;
515 for (int i = 0; i < sampleTimes.length; i++) {
516 cal.setTimeInMillis(sampleTimes[i]);
517 int era = cal.get(Calendar.ERA);
518 int year = cal.get(Calendar.YEAR);
519 int month = cal.get(Calendar.MONTH);
520 int day = cal.get(Calendar.DAY_OF_MONTH);
521 int dow = cal.get(Calendar.DAY_OF_WEEK);
522 int mid = cal.get(Calendar.MILLISECONDS_IN_DAY);
523 a_offset = tza_a.getOffset(era, year, month, day, dow, mid);
524 b_offset = tza_b.getOffset(era, year, month, day, dow, mid);
525 Date d = new Date(sampleTimes[i]);
526 a_dst = tza_a.inDaylightTime(d);
527 b_dst = tza_b.inDaylightTime(d);
528 if (a_offset != b_offset || a_dst != b_dst) {
537 private static class JavaTimeZoneHandler implements Handler {
538 String[] ZONES = { "GMT", "America/New_York", "GMT+05:45" };
540 public Object[] getTestObjects() {
541 JavaTimeZone zones[] = new JavaTimeZone[ZONES.length];
542 for(int z = 0; z < ZONES.length; z += 1) {
543 java.util.TimeZone tz = java.util.TimeZone.getTimeZone(ZONES[z]);
544 zones[z] = new JavaTimeZone(tz, ZONES[z]);
549 public boolean hasSameBehavior(Object a, Object b)
551 TimeZone zone_a = (TimeZone) a;
552 TimeZone zone_b = (TimeZone) b;
554 if (!(TimeZone.getCanonicalID(zone_a.getID()).equals(TimeZone.getCanonicalID(zone_b.getID())))) {
558 int a_offsets[] = {0, 0};
559 int b_offsets[] = {0, 0};
561 boolean bSame = true;
562 for (int i = 0; i < sampleTimes.length; i++) {
563 zone_a.getOffset(sampleTimes[i], false, a_offsets);
564 zone_b.getOffset(sampleTimes[i], false, b_offsets);
565 if (a_offsets[0] != b_offsets[0] || a_offsets[1] != b_offsets[1]) {
574 private static class BigDecimalHandler implements Handler
589 public Object[] getTestObjects()
591 BigDecimal bds[] = new BigDecimal[values.length];
593 for (int i = 0; i < values.length; i += 1) {
594 bds[i] = new BigDecimal(values[i]);
600 public boolean hasSameBehavior(Object a, Object b) {
601 BigDecimal bda = (BigDecimal) a;
602 BigDecimal bdb = (BigDecimal) b;
604 return bda.toString().equals(bdb.toString());
608 private static class MathContextHandler implements Handler
610 int forms[] = {MathContext.PLAIN, MathContext.ENGINEERING, MathContext.SCIENTIFIC};
612 MathContext.ROUND_CEILING, MathContext.ROUND_DOWN, MathContext.ROUND_FLOOR,
613 MathContext.ROUND_HALF_DOWN, MathContext.ROUND_HALF_EVEN, MathContext.ROUND_HALF_UP,
614 MathContext.ROUND_UNNECESSARY, MathContext.ROUND_UP};
616 public Object[] getTestObjects()
618 int objectCount = forms.length * rounds.length;
619 MathContext contexts[] = new MathContext[objectCount];
622 for (int f = 0; f < forms.length; f += 1) {
623 for (int r = 0; r < rounds.length; r += 1) {
625 boolean lostDigits = (r & 1) != 0;
627 contexts[i++] = new MathContext(digits, forms[f], lostDigits, rounds[r]);
634 public boolean hasSameBehavior(Object a, Object b)
636 MathContext mca = (MathContext) a;
637 MathContext mcb = (MathContext) b;
639 return mca.toString().equals(mcb.toString());
643 private static HashMap map = new HashMap();
646 map.put("com.ibm.icu.util.TimeZone", new TimeZoneHandler());
647 map.put("com.ibm.icu.util.SimpleTimeZone", new SimpleTimeZoneHandler());
648 map.put("com.ibm.icu.util.RuleBasedTimeZone", new RuleBasedTimeZoneHandler());
649 map.put("com.ibm.icu.util.VTimeZone", new VTimeZoneHandler());
650 map.put("com.ibm.icu.util.DateTimeRule", new DateTimeRuleHandler());
651 map.put("com.ibm.icu.util.AnnualTimeZoneRule", new AnnualTimeZoneRuleHandler());
652 map.put("com.ibm.icu.util.InitialTimeZoneRule", new InitialTimeZoneRuleHandler());
653 map.put("com.ibm.icu.util.TimeArrayTimeZoneRule", new TimeArrayTimeZoneRuleHandler());
654 map.put("com.ibm.icu.util.ULocale", new ULocaleHandler());
655 map.put("com.ibm.icu.util.Currency", new CurrencyHandler());
656 map.put("com.ibm.icu.impl.JavaTimeZone", new JavaTimeZoneHandler());
657 map.put("com.ibm.icu.impl.OlsonTimeZone", new OlsonTimeZoneHandler());
658 map.put("com.ibm.icu.impl.TimeZoneAdapter", new TimeZoneAdapterHandler());
659 map.put("com.ibm.icu.math.BigDecimal", new BigDecimalHandler());
660 map.put("com.ibm.icu.math.MathContext", new MathContextHandler());
662 map.put("com.ibm.icu.text.NumberFormat", new FormatTests.NumberFormatHandler());
663 map.put("com.ibm.icu.text.DecimalFormat", new FormatTests.DecimalFormatHandler());
664 map.put("com.ibm.icu.text.CompactDecimalFormat", new FormatTests.CompactDecimalFormatHandler());
665 map.put("com.ibm.icu.text.RuleBasedNumberFormat", new FormatTests.RuleBasedNumberFormatHandler());
666 map.put("com.ibm.icu.text.CurrencyPluralInfo", new FormatTests.CurrencyPluralInfoHandler());
667 map.put("com.ibm.icu.text.DecimalFormatSymbols", new FormatTests.DecimalFormatSymbolsHandler());
668 map.put("com.ibm.icu.text.MessageFormat", new FormatTests.MessageFormatHandler());
669 map.put("com.ibm.icu.text.DateFormat", new FormatTests.DateFormatHandler());
670 map.put("com.ibm.icu.text.DateFormatSymbols", new FormatTests.DateFormatSymbolsHandler());
671 map.put("com.ibm.icu.util.DateInterval", new DateIntervalHandler());
672 map.put("com.ibm.icu.text.DateIntervalFormat", new FormatTests.DateIntervalFormatHandler());
673 map.put("com.ibm.icu.text.DateIntervalInfo", new FormatTests.DateIntervalInfoHandler());
674 map.put("com.ibm.icu.text.DateIntervalInfo$PatternInfo", new FormatTests.PatternInfoHandler());
675 map.put("com.ibm.icu.text.SimpleDateFormat", new FormatTests.SimpleDateFormatHandler());
676 map.put("com.ibm.icu.text.ChineseDateFormat", new FormatTests.ChineseDateFormatHandler());
677 map.put("com.ibm.icu.text.ChineseDateFormatSymbols", new FormatTests.ChineseDateFormatSymbolsHandler());
678 map.put("com.ibm.icu.impl.DateNumberFormat", new FormatTests.DateNumberFormatHandler());
679 map.put("com.ibm.icu.text.PluralFormat", new FormatTests.PluralFormatHandler());
680 map.put("com.ibm.icu.text.PluralRules", new FormatTests.PluralRulesHandler());
681 map.put("com.ibm.icu.text.PluralRulesSerialProxy", new FormatTests.PluralRulesSerialProxyHandler());
682 map.put("com.ibm.icu.text.TimeUnitFormat", new FormatTests.TimeUnitFormatHandler());
683 map.put("com.ibm.icu.text.SelectFormat", new FormatTests.SelectFormatHandler());
684 map.put("com.ibm.icu.impl.TimeZoneNamesImpl", new FormatTests.TimeZoneNamesHandler());
685 map.put("com.ibm.icu.text.TimeZoneFormat", new FormatTests.TimeZoneFormatHandler());
686 map.put("com.ibm.icu.impl.TimeZoneGenericNames", new FormatTests.TimeZoneGenericNamesHandler());
688 map.put("com.ibm.icu.util.Calendar", new CalendarTests.CalendarHandler());
689 map.put("com.ibm.icu.util.BuddhistCalendar", new CalendarTests.BuddhistCalendarHandler());
690 map.put("com.ibm.icu.util.ChineseCalendar", new CalendarTests.ChineseCalendarHandler());
691 map.put("com.ibm.icu.util.CopticCalendar", new CalendarTests.CopticCalendarHandler());
692 map.put("com.ibm.icu.util.DangiCalendar", new CalendarTests.DangiCalendarHandler());
693 map.put("com.ibm.icu.util.EthiopicCalendar", new CalendarTests.EthiopicCalendarHandler());
694 map.put("com.ibm.icu.util.GregorianCalendar", new CalendarTests.GregorianCalendarHandler());
695 map.put("com.ibm.icu.util.HebrewCalendar", new CalendarTests.HebrewCalendarHandler());
696 map.put("com.ibm.icu.util.IndianCalendar", new CalendarTests.IndianCalendarHandler());
697 map.put("com.ibm.icu.util.IslamicCalendar", new CalendarTests.IslamicCalendarHandler());
698 map.put("com.ibm.icu.util.JapaneseCalendar", new CalendarTests.JapaneseCalendarHandler());
699 map.put("com.ibm.icu.util.PersianCalendar", new CalendarTests.PersianCalendarHandler());
700 map.put("com.ibm.icu.util.TaiwanCalendar", new CalendarTests.TaiwanCalendarHandler());
702 map.put("com.ibm.icu.text.ArabicShapingException", new ExceptionTests.ArabicShapingExceptionHandler());
703 map.put("com.ibm.icu.text.StringPrepParseException", new ExceptionTests.StringPrepParseExceptionHandler());
704 map.put("com.ibm.icu.util.UResourceTypeMismatchException", new ExceptionTests.UResourceTypeMismatchExceptionHandler());
705 map.put("com.ibm.icu.impl.InvalidFormatException", new ExceptionTests.InvalidFormatExceptionHandler());
707 map.put("com.ibm.icu.text.NumberFormat$Field", new FormatTests.NumberFormatFieldHandler());
708 map.put("com.ibm.icu.text.DateFormat$Field", new FormatTests.DateFormatFieldHandler());
709 map.put("com.ibm.icu.text.ChineseDateFormat$Field", new FormatTests.ChineseDateFormatFieldHandler());
710 map.put("com.ibm.icu.text.MessageFormat$Field", new FormatTests.MessageFormatFieldHandler());
712 map.put("com.ibm.icu.impl.duration.BasicDurationFormat", new FormatTests.BasicDurationFormatHandler());
713 map.put("com.ibm.icu.impl.RelativeDateFormat", new FormatTests.RelativeDateFormatHandler());
714 map.put("com.ibm.icu.util.IllformedLocaleException", new ExceptionTests.IllformedLocaleExceptionHandler());
715 map.put("com.ibm.icu.impl.locale.LocaleSyntaxException", new ExceptionTests.LocaleSyntaxExceptionHandler());
716 map.put("com.ibm.icu.impl.IllegalIcuArgumentException", new ExceptionTests.IllegalIcuArgumentExceptionHandler());
718 map.put("com.ibm.icu.text.PluralRules$FixedDecimal", new PluralRulesTest.FixedDecimalHandler());
719 map.put("com.ibm.icu.util.MeasureUnit", new MeasureUnitTest.MeasureUnitHandler());
720 map.put("com.ibm.icu.util.TimeUnit", new MeasureUnitTest.MeasureUnitHandler());
721 map.put("com.ibm.icu.text.GeneralMeasureFormat", new MeasureUnitTest.GeneralMeasureFormatHandler());
724 public SerializableTest()
728 "com.ibm.icu.dev.test.serializable.CoverageTest",
729 "com.ibm.icu.dev.test.serializable.CompatibilityTest"},
730 "All Serializable Tests"
734 public static final String CLASS_TARGET_NAME = "Serializable";
736 public static void main(String[] args)
738 SerializableTest test = new SerializableTest();