ICU-4907 modifications for eclipse/1.3/foundation compatibility

X-SVN-Rev: 18825
This commit is contained in:
Doug Felt 2005-11-23 00:13:07 +00:00
parent ac021ea5cc
commit d13c3f68b6
3 changed files with 14 additions and 11 deletions

View file

@ -541,7 +541,7 @@ public class TestFmwk extends AbstractTestLog {
StringBuffer summary = null;
try {
if (tests[0] == null) { // no args
if (tests.length == 0 || tests[0] == null) { // no args
params.init();
resolveTarget(params).run();
ec = params.errorCount;
@ -561,10 +561,11 @@ public class TestFmwk extends AbstractTestLog {
if (summary == null) {
summary = new StringBuffer();
}
summary.append("\nTest: " + tests[i]);
summary.append("\nTest Root: " + tests[i] + "\n");
summary.append(params.errorSummary());
}
}
}
params.errorSummary = summary;
}
} catch (Exception e) {
e.printStackTrace(params.log);
@ -572,7 +573,6 @@ public class TestFmwk extends AbstractTestLog {
params.log.println("encountered exception, exiting");
}
params.errorSummary = summary;
return ec;
}

View file

@ -343,13 +343,13 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
"y/M/d H:mm v", "pf", "2005/4/3 1:30 PT", "2005 04 03 01:30 PST", "2005/4/3 1:30 PT",
"y/M/d H:mm", "pf", "2005/4/3 1:30 PT", "2005 04 03 01:30 PST", "2005/4/3 1:30",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT",
"y/M/d H:mm", "pf", "2004/10/31 1:30", "2004 10 31 01:30 PDT", "2004/10/31 1:30",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PST",
"y/M/d H:mm zzz", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PDT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PT", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PST", "2004 10 31 01:30 PST", "2004/10/31 1:30 PT",
"y/M/d H:mm v", "pf", "2004/10/31 1:30 PDT", "2004 10 31 01:30 PDT", "2004/10/31 1:30 PT",
"y/M/d H:mm", "pf", "2004/10/31 1:30", "2004 10 31 01:30 PST", "2004/10/31 1:30",
};
expect(ZDATA, en);
@ -2335,6 +2335,7 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
SimpleDateFormat univ = new SimpleDateFormat("EE G yyyy MM dd HH:mm:ss.SSS zzz", loc);
String currentPat = null;
SimpleDateFormat ref = new SimpleDateFormat(data[0], loc);
while (i<data.length) {
SimpleDateFormat fmt = new SimpleDateFormat("", loc);
String pattern = data[i++];

View file

@ -1226,8 +1226,10 @@ public class SimpleDateFormat extends DateFormat {
// then we ask the timezone to handle this local time
int[] offsets = new int[2];
tz.getOffset(copy.getTimeInMillis()+tz.getRawOffset(), true, offsets);
cal.set(Calendar.ZONE_OFFSET, offsets[0]);
cal.set(Calendar.DST_OFFSET, offsets[1]);
cal.setTimeZone(tz);
}
}
}