Skip to content

Commit 35b961c

Browse files
committed
ICU-23056 Integrate CLDR 48 release alpha0, part 3, source and test files
1 parent 6a7f53f commit 35b961c

27 files changed

+19669
-993
lines changed

icu4c/source/test/cintltst/crelativedateformattest.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -258,31 +258,31 @@ static const FieldsDat fr_attrDef_long_midSent_day[kNumOffsets*2] = {
258258

259259
static const char* ak_decDef_long_stdAlon_sec[kNumOffsets*2] = { // falls back to root
260260
/* text numeric */
261-
"nnibuo 5 a atwam", "nnibuo 5 a atwam", /* -5 */
262-
"nnibuo 2.2 a atwam", "nnibuo 2.2 a atwam", /* -2.2 */
263-
"nnibuo 2 a atwam", "nnibuo 2 a atwam", /* -2 */
264-
"anibuo 1 a atwam", "anibuo 1 a atwam", /* -1 */
265-
"nnibuo 0.7 a atwam", "nnibuo 0.7 a atwam", /* -0.7 */
266-
"seesei", "anibuo 0 a atwam", /* -0 */
267-
"seesei", "anibuo 0 mu", /* 0 */
268-
"nnibuo 0.7 mu", "nnibuo 0.7 mu", /* 0.7 */
269-
"anibuo 1 mu", "anibuo 1 mu", /* 1 */
270-
"nnibuo 2 mu", "nnibuo 2 mu", /* 2 */
271-
"nnibuo 5 mu", "nnibuo 5 mu", /* 5 */
261+
"simasin 5 a atwam", "simasin 5 a atwam", /* -5 */
262+
"simasin 2.2 a atwam", "simasin 2.2 a atwam", /* -2.2 */
263+
"simasin 2 a atwam", "simasin 2 a atwam", /* -2 */
264+
"simasin 1 a atwam", "simasin 1 a atwam", /* -1 */
265+
"simasin 0.7 a atwam", "simasin 0.7 a atwam", /* -0.7 */
266+
"seesei", "simasin 0 a atwam", /* -0 */
267+
"seesei", "simasin 0 mu", /* 0 */
268+
"simasin 0.7 mu", "simasin 0.7 mu", /* 0.7 */
269+
"simasin 1 mu", "simasin 1 mu", /* 1 */
270+
"simasin 2 mu", "simasin 2 mu", /* 2 */
271+
"simasin 5 mu", "simasin 5 mu", /* 5 */
272272
};
273273

274274
static const FieldsDat ak_attrDef_long_stdAlon_sec[kNumOffsets*2] = {
275-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
276-
{UDAT_REL_NUMERIC_FIELD, 7, 10}, {UDAT_REL_NUMERIC_FIELD, 7, 10},
277-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
278-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
279-
{UDAT_REL_NUMERIC_FIELD, 7, 10}, {UDAT_REL_NUMERIC_FIELD, 7, 10},
280-
{ -1, -1, -1}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
281-
{ -1, -1, -1}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
282-
{UDAT_REL_NUMERIC_FIELD, 7, 10}, {UDAT_REL_NUMERIC_FIELD, 7, 10},
283-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
284-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
285-
{UDAT_REL_NUMERIC_FIELD, 7, 8}, {UDAT_REL_NUMERIC_FIELD, 7, 8},
275+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
276+
{UDAT_REL_NUMERIC_FIELD, 8, 11}, {UDAT_REL_NUMERIC_FIELD, 8, 11},
277+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
278+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
279+
{UDAT_REL_NUMERIC_FIELD, 8, 11}, {UDAT_REL_NUMERIC_FIELD, 8, 11},
280+
{ -1, -1, -1}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
281+
{ -1, -1, -1}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
282+
{UDAT_REL_NUMERIC_FIELD, 8, 11}, {UDAT_REL_NUMERIC_FIELD, 8, 11},
283+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
284+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
285+
{UDAT_REL_NUMERIC_FIELD, 8, 9}, {UDAT_REL_NUMERIC_FIELD, 8, 9},
286286
};
287287

288288
static const char* enIN_decDef_short_midSent_weds[kNumOffsets*2] = {

icu4c/source/test/cintltst/currtest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static void TestFractionDigitOverride(void) {
198198
UNumberFormat *fmt = unum_open(UNUM_CURRENCY, NULL, 0, "hu_HU", NULL, &status);
199199
UChar buffer[256];
200200
UChar expectedBuf[256];
201-
const char expectedFirst[] = "123,46\\u00A0Ft"; /* changed to use 2 fraction digits */
201+
const char expectedFirst[] = "123\\u00A0Ft"; /* CLDR-11586 - HUF has 0 default fractional digits */
202202
const char expectedSecond[] = "123,46\\u00A0Ft";
203203
const char expectedThird[] = "123,456\\u00A0Ft";
204204
if (U_FAILURE(status)) {

icu4c/source/test/cintltst/udatpg_test.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -849,15 +849,15 @@ static void TestISO8601(void) {
849849
} TestCase;
850850

851851
const TestCase testCases[] = {
852-
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EEEEyMMMMdjmm", u"y MMMM d, EEEE h:mm a" },
853-
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EEEEyMMMMdHmm", u"y MMMM d, EEEE HH:mm" },
854-
{ "en_GB@calendar=iso8601;rg=uszzzz", u"Edjmm", u"d, EEE h:mm a" },
855-
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EdHmm", u"d, EEE HH:mm" },
856-
857-
{ "en_US@calendar=iso8601", u"EEEEyMMMMdjmm", u"y MMMM d, EEEE h:mm a" },
858-
{ "en_US@calendar=iso8601", u"EEEEyMMMMdHmm", u"y MMMM d, EEEE HH:mm" },
859-
{ "en_US@calendar=iso8601", u"Edjmm", u"d, EEE h:mm a" },
860-
{ "en_US@calendar=iso8601", u"EdHmm", u"d, EEE HH:mm" },
852+
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EEEEyMMMMdjmm", u"y MMMM d, EEEE 'at' h:mm a" },
853+
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EEEEyMMMMdHmm", u"y MMMM d, EEEE 'at' HH:mm" },
854+
{ "en_GB@calendar=iso8601;rg=uszzzz", u"Edjmm", u"d, EEE, h:mm a" },
855+
{ "en_GB@calendar=iso8601;rg=uszzzz", u"EdHmm", u"d, EEE, HH:mm" },
856+
857+
{ "en_US@calendar=iso8601", u"EEEEyMMMMdjmm", u"y MMMM d, EEEE 'at' h:mm a" },
858+
{ "en_US@calendar=iso8601", u"EEEEyMMMMdHmm", u"y MMMM d, EEEE 'at' HH:mm" },
859+
{ "en_US@calendar=iso8601", u"Edjmm", u"d, EEE, h:mm a" },
860+
{ "en_US@calendar=iso8601", u"EdHmm", u"d, EEE, HH:mm" },
861861

862862
{ "en_US", u"EEEEyMMMMdjmm", u"EEEE, MMMM d, y 'at' h:mm a" },
863863
{ "en_US", u"EEEEyMMMMdHmm", u"EEEE, MMMM d, y 'at' HH:mm" },

icu4c/source/test/intltest/compactdecimalformattest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ void CompactDecimalFormatTest::TestAPIVariants() {
495495

496496
void CompactDecimalFormatTest::TestBug12975() {
497497
IcuTestErrorCode status(*this, "TestBug12975");
498+
if (logKnownIssue("CLDR-18904", "Compact number formatting in Italian is incorrect")) {
499+
return;
500+
}
498501
Locale locale("it");
499502
LocalPointer<CompactDecimalFormat> cdf(CompactDecimalFormat::createInstance(locale, UNUM_SHORT, status));
500503
if (assertSuccess("", status, true, __FILE__, __LINE__)) {

icu4c/source/test/intltest/dtfmttst.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,14 +3203,14 @@ void DateFormatTest::TestTimeZoneDisplayName()
32033203
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
32043204
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
32053205
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-8", "America/Los_Angeles" },
3206-
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u30a2\\u30e1\\u30ea\\u30ab\\u592a\\u5e73\\u6d0b\\u6a19\\u6e96\\u6642", "America/Los_Angeles" },
3206+
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u7c73\\u56fd\\u592a\\u5e73\\u6d0b\\u6a19\\u6e96\\u6642", "America/Los_Angeles" },
32073207
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-700" },
32083208
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
32093209
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-7", "America/Los_Angeles" },
3210-
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u30a2\\u30e1\\u30ea\\u30ab\\u592a\\u5e73\\u6d0b\\u590f\\u6642\\u9593", "America/Los_Angeles" },
3210+
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u7c73\\u56fd\\u592a\\u5e73\\u6d0b\\u590f\\u6642\\u9593", "America/Los_Angeles" },
32113211
// icu ja.txt has exemplar city for this time zone
32123212
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u30ED\\u30B5\\u30F3\\u30BC\\u30EB\\u30B9\\u6642\\u9593", "America/Los_Angeles" },
3213-
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u30A2\\u30E1\\u30EA\\u30AB\\u592A\\u5e73\\u6D0B\\u6642\\u9593", "America/Los_Angeles" },
3213+
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u7c73\\u56fd\\u592a\\u5e73\\u6d0b\\u6642\\u9593", "America/Los_Angeles" },
32143214
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "\\u30ED\\u30B5\\u30F3\\u30BC\\u30EB\\u30B9\\u6642\\u9593", "America/Los_Angeles" },
32153215

32163216
{ "ja", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },

icu4c/source/test/intltest/dtifmtts.cpp

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -834,15 +834,15 @@ void DateIntervalFormatTest::testFormat() {
834834
"zh", "CE 2007 10 10 10:10:10", "CE 2008 10 10 10:10:10", "EEEEdMMMMy", "2007\\u5e7410\\u670810\\u65e5\\u661f\\u671f\\u4e09\\u81f32008\\u5e7410\\u670810\\u65e5\\u661f\\u671f\\u4e94",
835835

836836

837-
"zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMMy", "2007\\u5e7410\\u670810\\u65e5\\u81f311\\u670810\\u65e5",
837+
"zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "dMMMMy", "2007\\u5E74\\u5341\\u670810\\u65E5\\u2009\\u2013\\u2009\\u5341\\u4E00\\u670810\\u65E5",
838838

839839

840-
"zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMMy", "2007\\u5e7410\\u6708\\u81f311\\u6708",
840+
"zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "MMMMy", "2007\\u5e7410\\u6708 \\u2013 11\\u6708",
841841

842842

843843
"zh", "CE 2007 10 10 10:10:10", "CE 2007 11 10 10:10:10", "hmv", "2007/10/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4 \\u4E0A\\u534810:10 \\u2013 2007/11/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4 \\u4E0A\\u534810:10",
844844

845-
"zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMMy", "2007\\u5e7411\\u670810\\u65e5\\u661f\\u671f\\u516d\\u81f320\\u65e5\\u661f\\u671f\\u4e8c",
845+
"zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "EEEEdMMMMy", "2007\\u5E74\\u5341\\u4E00\\u670810\\u65E5\\u661F\\u671F\\u516D\\u2009\\u2013\\u2009\\u5341\\u4E00\\u670820\\u65E5\\u661F\\u671F\\u4E8C",
846846

847847

848848
"zh", "CE 2007 11 10 10:10:10", "CE 2007 11 20 10:10:10", "dMMMM", "11\\u670810\\u65e5\\u81f320\\u65e5",
@@ -1019,14 +1019,14 @@ void DateIntervalFormatTest::testFormat() {
10191019
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "MMMy", "\\u0E15.\\u0E04. 2550 \\u2013 \\u0E15.\\u0E04. 2551",
10201020

10211021

1022-
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdMy", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
1022+
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdMy", "\\u0E1E\\u0E38\\u0E18 10/10/2550 \\u2013 \\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C 10/10/2551",
10231023

10241024
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "dMy", "10/10/2550 \\u2013 10/10/2551",
10251025

10261026

10271027
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "My", "10/2550 \\u2013 10/2551",
10281028

1029-
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdM", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
1029+
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "EdM", "\\u0E1E\\u0E38\\u0E18 10/10/2550 \\u2013 \\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C 10/10/2551",
10301030

10311031

10321032
"th", "BE 2550 10 10 10:10:10", "BE 2551 10 10 10:10:10", "y", "2550\\u20132551",
@@ -1245,12 +1245,31 @@ void DateIntervalFormatTest::expect(const char** data, int32_t data_length) {
12451245
DateInterval dtitv(date, date_2);
12461246

12471247
const UnicodeString& oneSkeleton(ctou(data[i++]));
1248-
1248+
12491249
DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(oneSkeleton, loc, ec);
12501250
if (!assertSuccess("createInstance(skeleton) in expect", ec)) return;
12511251
FieldPosition pos(FieldPosition::DONT_CARE);
12521252
dtitvfmt->format(&dtitv, str.remove(), pos, ec);
12531253
if (!assertSuccess("format in expect", ec)) return;
1254+
if (strcmp(locName, "ja-u-ca-japanese") == 0 &&
1255+
logKnownIssue("ICU-23182", "Japanese calendar formatting")) {
1256+
i++;
1257+
continue;
1258+
}
1259+
1260+
if (strcmp(locName, "de") == 0 &&
1261+
(oneSkeleton == UnicodeString(u"hv",-1) || oneSkeleton == UnicodeString(u"hz",-1)) &&
1262+
logKnownIssue("ICU-23185", "Date time formatting with hz and hv needs revisiting")) {
1263+
i++;
1264+
continue;
1265+
}
1266+
1267+
if (strcmp(locName, "zh") == 0 &&
1268+
(oneSkeleton == UnicodeString(u"hmv",-1) || oneSkeleton == UnicodeString(u"hmz",-1)) &&
1269+
logKnownIssue("ICU-23185", "Date time formatting with hz and hv needs revisiting")) {
1270+
i++;
1271+
continue;
1272+
}
12541273
assertEquals(UnicodeString("\"") + locName + "\\" + oneSkeleton + "\\" + ctou(datestr) + "\\" + ctou(datestr_2) + "\"", ctou(data[i++]), str);
12551274

12561275
logln("interval date:" + str + "\"" + locName + "\", "
@@ -2295,26 +2314,30 @@ void DateIntervalFormatTest::testTicket21222ROCEraDiff() {
22952314

22962315
formatted = roc->formatToValue(bothAfterMG, status);
22972316
assertEquals("roc calendar - both dates in MG Era",
2298-
u"民國1/1/2 上午6時\u2009\u2013\u2009民國2/1/2 上午6時",
2317+
u"民國1/1/2上午6時\u2009\u2013\u2009民國2/1/2上午6時",
22992318
formatted.toString(status));
23002319
getCategoryAndField(formatted, expectedCategory,
23012320
expectedField, status);
23022321

23032322
formatted = roc->formatToValue(beforeAfterMG, status);
23042323
assertEquals("roc calendar - prior MG Era and in MG Era",
2305-
u"民國前1/1/2 上午6時\u2009\u2013\u2009民國2/1/2 上午6時",
2324+
u"民國前1/1/2上午6時\u2009\u2013\u2009民國2/1/2上午6時",
23062325
formatted.toString(status));
23072326
verifyCategoryAndField(formatted, expectedCategory, expectedField, status);
23082327

23092328
formatted = roc->formatToValue(bothBeforeMG, status);
23102329
assertEquals("roc calendar - both dates prior MG Era",
2311-
u"民國前2/1/2 上午6時\u2009\u2013\u2009民國前1/1/2 上午6時",
2330+
u"民國前2/1/2上午6時\u2009\u2013\u2009民國前1/1/2上午6時",
23122331
formatted.toString(status));
23132332
verifyCategoryAndField(formatted, expectedCategory, expectedField, status);
23142333
}
23152334

23162335
void DateIntervalFormatTest::testTicket21222JapaneseEraDiff() {
23172336
IcuTestErrorCode status(*this, "testTicket21222JapaneseEraDiff");
2337+
2338+
if (logKnownIssue("ICU-23182", "Japanese calendar formatting")) {
2339+
return;
2340+
}
23182341

23192342
LocalPointer<Calendar> cal(Calendar::createInstance(*TimeZone::getGMT(), status));
23202343
if (U_FAILURE(status)) {

icu4c/source/test/intltest/dtptngts.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,11 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/)
696696
resultDate = sdf.format(testDate, resultDate);
697697
if ( resultDate != patternResults[localeIndex][resultIndex] ) {
698698
const auto* calendar = sdf.getCalendar();
699+
if (localeIndex == 6 && (dataIndex == 1 || dataIndex == 3) &&
700+
logKnownIssue("ICU-23182", "Japanese calendar formatting")) {
701+
resultIndex++;
702+
continue;
703+
}
699704
errln(UnicodeString("\nERROR: Test various skeletons[") + (dataIndex-1) + UnicodeString("], localeIndex ") + localeIndex +
700705
u". Got: \"" + resultDate +
701706
u"\" with calendar " + calendar->getType() +
@@ -1586,7 +1591,7 @@ void IntlTestDateTimePatternGeneratorAPI::testBestPattern() {
15861591
// ICU-21428: Bad patterns for nonstandard calendars
15871592
{ "en_GB", "yMd", u"dd/MM/y" },
15881593
{ "en_GB@calendar=coptic", "yMd", u"dd/MM/y GGGGG" },
1589-
{ "en_GB@calendar=japanese", "yMd", u"dd/MM/y GGGGG" },
1594+
{ "en_GB@calendar=japanese", "yMd", u"d/M/y GGGGG" },
15901595
{ "en_GB@calendar=buddhist", "yMd", u"dd/MM/y GGGGG" },
15911596
// ICU-22757: Not inheriting availableFormats patterns from root
15921597
{ "sv_SE", "yMd", u"y-MM-dd" },

icu4c/source/test/intltest/incaltst.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,13 @@ void IntlCalendarTest::quasiGregorianTest(Calendar& cal, const Locale& gcl, cons
238238
cal.get(UCAL_YEAR, status) + "/" +
239239
(cal.get(UCAL_MONTH, status) + 1) + "/" + cal.get(UCAL_DATE, status) + " (" + UnicodeString(cal.getType()) + ")");
240240
} else {
241-
errln(UnicodeString("Fail: (millis to fields)") + D + " => " + cal.get(UCAL_ERA, status) + ":" +
241+
if (!logKnownIssue("ICU-23186", "Japanese calendar round trip fails")) {
242+
errln(UnicodeString("Fail: (millis to fields)") + D + " => " + cal.get(UCAL_ERA, status) + ":" +
242243
cal.get(UCAL_YEAR, status) + "/" +
243244
(cal.get(UCAL_MONTH, status)+1) + "/" + cal.get(UCAL_DATE, status) +
244245
", expected " + era + ":" + year + "/" + (month+1) + "/" +
245246
dayOfMonth + " (" + UnicodeString(cal.getType()));
247+
}
246248
}
247249
}
248250
delete grego;
@@ -561,16 +563,20 @@ void IntlCalendarTest::TestJapaneseFormat() {
561563
logln(UnicodeString() + "as Japanese Calendar: " + str);
562564
expected = u"Meiji 1";
563565
if(str != expected) {
564-
errln("Expected " + expected + " but got " + str);
566+
if (!logKnownIssue("ICU-23186", "Japanese calendar round trip fails")) {
567+
errln("Expected " + expected + " but got " + str);
568+
}
565569
}
566570
otherDate = fmti.parse(expected, status);
567571
if(otherDate != aDate) {
568572
UnicodeString str3;
569573
ParsePosition pp;
570574
fmti.parse(expected, *cal2, pp);
571575
fmti.format(otherDate, str3);
572-
errln("Parse incorrect of " + expected + " - wanted " + aDate + " but got " + " = " +
576+
if (!logKnownIssue("ICU-23186", "Japanese calendar round trip fails")) {
577+
errln("Parse incorrect of " + expected + " - wanted " + aDate + " but got " + " = " +
573578
otherDate + ", " + str3 + " = " + CalendarTest::calToStr(*cal2) );
579+
}
574580
} else {
575581
logln("Parsed OK: " + expected);
576582
}
@@ -739,14 +745,18 @@ void IntlCalendarTest::TestForceGannenNumbering()
739745
}
740746
testString2 = testFmt2->format(refDate, testString2);
741747
if (testString2.length() < 2 || testString2.charAt(1) != 0x0031) {
742-
errln(UnicodeString("Formatting year 1 in created numeric style, got " + testString2 + " but expected 2nd char to be 1"));
748+
if (!logKnownIssue("ICU-23182", "Japanese calendar formatting")) {
749+
errln(UnicodeString("Formatting year 1 in created numeric style, got " + testString2 + " but expected 2nd char to be 1"));
750+
}
743751
}
744752
// Now switch the patterns and verify that Gannen use follows the pattern
745753
testFmt1->applyPattern(patNumr);
746754
testString1.remove();
747755
testString1 = testFmt1->format(refDate, testString1);
748756
if (testString1.length() < 2 || testString1.charAt(1) != 0x0031) {
749-
errln(UnicodeString("Formatting year 1 in applied numeric style, got " + testString1 + " but expected 2nd char to be 1"));
757+
if (!logKnownIssue("ICU-23182", "Japanese calendar formatting")) {
758+
errln(UnicodeString("Formatting year 1 in applied numeric style, got " + testString1 + " but expected 2nd char to be 1"));
759+
}
750760
}
751761
testFmt2->applyPattern(patText);
752762
testString2.remove();

icu4c/source/test/intltest/listformattertest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,10 @@ void ListFormatterTest::TestRussian() {
444444
// For two elements, "\\u0d15\\u0d42\\u0d1f\\u0d3e\\u0d24\\u0d46" is inserted in between.
445445
// For more than two elements, comma is inserted between all elements up to (and including) the penultimate,
446446
// and the word \\u0d0e\\u0d28\\u0d4d\\u0d28\\u0d3f\\u0d35 is inserted in the end.
447+
// EDIT: this unit test is updated as ml now uses commas in lists
447448
void ListFormatterTest::TestMalayalam() {
448-
UnicodeString pair_string = UnicodeString(" \\u0d15\\u0d42\\u0d1f\\u0d3e\\u0d24\\u0d46 ", -1, US_INV).unescape();
449-
UnicodeString total_string = UnicodeString(" \\u0d0e\\u0d28\\u0d4d\\u0d28\\u0d3f\\u0d35", -1, US_INV).unescape();
449+
UnicodeString pair_string = UnicodeString(", ", -1, US_INV).unescape();
450+
UnicodeString total_string = UnicodeString("", -1, US_INV).unescape();
450451
UnicodeString results[4] = {
451452
one,
452453
one + pair_string + two,

0 commit comments

Comments
 (0)