diff --git a/icu4c/source/test/intltest/tzregts.cpp b/icu4c/source/test/intltest/tzregts.cpp index c8ea7e61aba..b13947873a8 100644 --- a/icu4c/source/test/intltest/tzregts.cpp +++ b/icu4c/source/test/intltest/tzregts.cpp @@ -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); diff --git a/icu4c/source/test/intltest/tztest.cpp b/icu4c/source/test/intltest/tztest.cpp index 192ea23c798..4bcc9a975ed 100644 --- a/icu4c/source/test/intltest/tztest.cpp +++ b/icu4c/source/test/intltest/tztest.cpp @@ -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