From 1084c1430aad6006d269d32941689defeeee2991 Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Tue, 24 Mar 2020 23:59:06 -0700 Subject: [PATCH] ICU-21022 Use logKnownIssue to avoid TestDateFormatRoundTrip exhaustive fail --- icu4c/source/test/intltest/dtfmtrtts.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/icu4c/source/test/intltest/dtfmtrtts.cpp b/icu4c/source/test/intltest/dtfmtrtts.cpp index 01b7c8087c..471d65c3d3 100644 --- a/icu4c/source/test/intltest/dtfmtrtts.cpp +++ b/icu4c/source/test/intltest/dtfmtrtts.cpp @@ -470,7 +470,14 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB } else if(!strcmp(type,"hebrew")) { maxSmatch = 3; maxDmatch = 3; - } + } else if (timeOnly && uprv_strcmp(origLocale.getName(),"ar_JO@calendar=islamic-civil")==0 && + logKnownIssue("21022", "ar_JO@calendar=islamic-civil timeOnly roundtrip converges too slowly")) { + // For some reason, for time-only tests, ar_JO@calendar=islamic-civil is no + // longer converging to a match as fast as expected above. Investigate with + // ICU-21022, but meanwhile allow more cycles for convergence. + maxSmatch = 2; + maxDmatch = 3; + } } // Use @v to see verbose results on successful cases @@ -478,7 +485,9 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB if (optionv || fail) { if (fail) { errln(UnicodeString("\nFAIL: Pattern: ") + pat + - " in Locale: " + origLocale.getName()); + " in Locale: " + origLocale.getName() + + "\nget dmatch: " + dmatch + " (expected max " + maxDmatch + + "), smatch: " + smatch + " (expected max " + maxSmatch + ")"); } else { errln(UnicodeString("\nOk: Pattern: ") + pat + " in Locale: " + origLocale.getName());