From f7de05f57ab72e301e9cd82bc9e7b32540f65373 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Thu, 10 Nov 2011 16:47:00 +0000 Subject: [PATCH] ICU-8592 Add timebomb for TestTimeRoundTrip test. X-SVN-Rev: 30946 --- icu4c/source/test/intltest/tzfmttst.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/icu4c/source/test/intltest/tzfmttst.cpp b/icu4c/source/test/intltest/tzfmttst.cpp index 8b402181d42..7095c7104ad 100644 --- a/icu4c/source/test/intltest/tzfmttst.cpp +++ b/icu4c/source/test/intltest/tzfmttst.cpp @@ -8,6 +8,7 @@ #if !UCONFIG_NO_FORMATTING +#include "intltest.h" #include "tzfmttst.h" #include "simplethread.h" @@ -259,6 +260,10 @@ public: UErrorCode status = U_ZERO_ERROR; UBool REALLY_VERBOSE = FALSE; + // Timebomb for TZData update + UVersionInfo icu49 = { 49, 0, 2, 0 }; + UBool isICUVersionPast49M1 = log.isICUVersionAtLeast(icu49); + // Whether each pattern is ambiguous at DST->STD local time overlap UBool AMBIGUOUS_DST_DECESSION[] = { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE }; // Whether each pattern is ambiguous at STD->STD/DST->DST local time overlap @@ -398,7 +403,9 @@ public: if (parsedDate != testTimes[testidx]) { UnicodeString msg = (UnicodeString) "Time round trip failed for " + "tzid=" + *tzid + ", locale=" + data.locales[locidx].getName() + ", pattern=" + PATTERNS[patidx] + ", text=" + text + ", time=" + testTimes[testidx] + ", restime=" + parsedDate + ", diff=" + (parsedDate - testTimes[testidx]); - if (expectedRoundTrip[testidx]) { + // Timebomb for TZData update + if (expectedRoundTrip[testidx] && + isICUVersionPast49M1) { log.errln((UnicodeString) "FAIL: " + msg); } else if (REALLY_VERBOSE) { log.logln(msg); -- 2.40.0