ICU-3379 test updates
X-SVN-Rev: 13707
This commit is contained in:
parent
80179e3b2f
commit
25e453df2d
@ -952,7 +952,7 @@ void TimeZoneRegressionTest::TestJ449() {
|
||||
// Make sure we got valid zones
|
||||
if (zoneWith->getID(str) != UnicodeString(idWithLocaleData) ||
|
||||
zoneWithout->getID(str) != UnicodeString(idWithoutLocaleData)) {
|
||||
errln("Fail: Unable to create zones");
|
||||
errln(UnicodeString("Fail: Unable to create zones - wanted ") + idWithLocaleData + ", got " + zoneWith->getID(str) + ", and wanted " + idWithoutLocaleData + " but got " + zoneWithout->getID(str));
|
||||
} else {
|
||||
GregorianCalendar calWith(*zoneWith, status);
|
||||
GregorianCalendar calWithout(*zoneWithout, status);
|
||||
|
@ -279,7 +279,15 @@ TimeZoneTest::TestPRTOffset()
|
||||
errln("FAIL: TimeZone(PRT) is null");
|
||||
}
|
||||
else {
|
||||
if (tz->getRawOffset() != (- 4 * millisPerHour)) errln("FAIL: Offset for PRT should be -4");
|
||||
int32_t expectedHour = -4;
|
||||
double expectedOffset = (((double)expectedHour) * millisPerHour);
|
||||
double foundOffset = tz->getRawOffset();
|
||||
int32_t foundHour = foundOffset / millisPerHour;
|
||||
if (expectedOffset != foundOffset) {
|
||||
errln("FAIL: Offset for PRT should be %d, found %d", expectedHour, foundHour);
|
||||
} else {
|
||||
logln("PASS: Offset for PRT should be %d, found %d", expectedHour, foundHour);
|
||||
}
|
||||
}
|
||||
delete tz;
|
||||
}
|
||||
@ -356,11 +364,10 @@ TimeZoneTest::TestGetAvailableIDs913()
|
||||
// we own the array; the caller owns the contained strings (yuck)
|
||||
uprv_free(ids);
|
||||
}
|
||||
|
||||
numIDs = -1;
|
||||
ids = TimeZone::createAvailableIDs("US", numIDs);
|
||||
if (ids == 0 || numIDs < 1) {
|
||||
errln("FAIL: createAvailableIDs(US)");
|
||||
errln("FAIL: createAvailableIDs(US) ids=%d, numIDs=%d", ids, numIDs);
|
||||
} else {
|
||||
UnicodeString buf("TimeZone::createAvailableIDs(US) = { ");
|
||||
for(i=0; i<numIDs; ++i) {
|
||||
@ -372,7 +379,6 @@ TimeZoneTest::TestGetAvailableIDs913()
|
||||
// we own the array; the caller owns the contained strings (yuck)
|
||||
uprv_free(ids);
|
||||
}
|
||||
|
||||
UnicodeString str;
|
||||
UnicodeString *buf = new UnicodeString("TimeZone::createEnumeration() = { ");
|
||||
int32_t s_length;
|
||||
|
Loading…
Reference in New Issue
Block a user