X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/a01113dcd0f39d5da295ef82785beff9ed86fe38..HEAD:/icuSources/test/intltest/tsdate.cpp diff --git a/icuSources/test/intltest/tsdate.cpp b/icuSources/test/intltest/tsdate.cpp index 596ce970..79e61e82 100644 --- a/icuSources/test/intltest/tsdate.cpp +++ b/icuSources/test/intltest/tsdate.cpp @@ -164,14 +164,22 @@ void IntlTestDateFormat::tryDate(UDate theDate) date[0] = theDate; fFormat->format(theDate, string[0]); + UErrorCode status = U_ZERO_ERROR; + const char* locID = "??"; + Locale loc = fFormat->getCalendar()->getLocale(ULOC_VALID_LOCALE, status); + if (U_SUCCESS(status)) { + locID = loc.getName(); + } + for (i=1; iparse(string[i-1], status); if (U_FAILURE(status)) { describeTest(); - errln("**** FAIL: Parse of " + prettify(string[i-1], FALSE) + " failed."); + errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) + + ": Parse of " + prettify(string[i-1], FALSE) + " failed."); dump = TRUE; break; } @@ -181,7 +189,8 @@ void IntlTestDateFormat::tryDate(UDate theDate) else if (dateMatch > 0 && date[i] != date[i-1]) { describeTest(); - errln("**** FAIL: Date mismatch after match for " + string[i]); + errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) + + ": Date mismatch after match for " + string[i]); dump = TRUE; break; } @@ -190,7 +199,8 @@ void IntlTestDateFormat::tryDate(UDate theDate) else if (stringMatch > 0 && string[i] != string[i-1]) { describeTest(); - errln("**** FAIL: String mismatch after match for " + string[i]); + errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) + + ": String mismatch after match for " + string[i]); dump = TRUE; break; }