Skip to content

Commit dc5f4aa

Browse files
committed
ICU-23341 Update tests
1 parent 54c37df commit dc5f4aa

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

icu4c/source/test/cintltst/ccaltst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2168,7 +2168,7 @@ void TestAddRollEra0AndEraBounds(void) {
21682168
const EraTestItem * eraTestItemPtr;
21692169
for (eraTestItemPtr = eraTestItems; eraTestItemPtr->locale != NULL; eraTestItemPtr++) {
21702170
if (uprv_strstr(eraTestItemPtr->locale, "calendar=japanese") != NULL &&
2171-
log_knownIssue("ICU-23341", "ICU needs to handle removal of data for pre-Meiji Japanese eras")) {
2171+
log_knownIssue("ICU-23108", "ICU needs to implement era inheritance")) {
21722172
continue;
21732173
}
21742174
UErrorCode status = U_ZERO_ERROR;

icu4c/source/test/intltest/incaltst.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ void IntlCalendarTest::TestJapaneseFormat() {
579579

580580
// Now, try in Japanese
581581
{
582+
// 平成13年9月8日土曜日
582583
UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
583584
UDate expectDate = 999932400000.0; // Testing a recent date
584585
Locale loc("ja_JP@calendar=japanese");
@@ -587,24 +588,26 @@ void IntlCalendarTest::TestJapaneseFormat() {
587588
simpleTest(loc, expect, expectDate, status);
588589
}
589590
{
591+
// 平成13年9月8日土曜日
590592
UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
591593
UDate expectDate = 999932400000.0; // Testing a recent date
592594
Locale loc("ja_JP@calendar=japanese");
593595

594596
status = U_ZERO_ERROR;
595597
simpleTest(loc, expect, expectDate, status);
596598
}
597-
if (!logKnownIssue("ICU-23341", "ICU needs to handle removal of data for pre-Meiji Japanese eras")) {
598-
// When era for 1776 is deleted, format result will be different
599-
UnicodeString expect = CharsToUnicodeString("\\u5b89\\u6c385\\u5e747\\u67084\\u65e5\\u6728\\u66dc\\u65e5");
599+
if (!logKnownIssue("ICU-23108", "ICU needs to implement era inheritance")) {
600+
// 西暦1776年7月4日木曜日
601+
UnicodeString expect = CharsToUnicodeString("\\u897f\\u66a61776\\u5e747\\u67084\\u65e5\\u6728\\u66dc\\u65e5");
600602
UDate expectDate = -6106032422000.0; // 1776-07-04T00:00:00Z-075258
601603
Locale loc("ja_JP@calendar=japanese");
602604

603605
status = U_ZERO_ERROR;
604606
simpleTest(loc, expect, expectDate, status);
605607

606608
}
607-
{ // Jitterbug 1869 - this is an ambiguous era. (Showa 64 = Jan 6 1989, but Showa could be 2 other eras) )
609+
{
610+
// 昭和64年1月6日金曜日
608611
UnicodeString expect = CharsToUnicodeString("\\u662d\\u548c64\\u5e741\\u67086\\u65e5\\u91d1\\u66dc\\u65e5");
609612
UDate expectDate = 600076800000.0;
610613
Locale loc("ja_JP@calendar=japanese");
@@ -622,10 +625,9 @@ void IntlCalendarTest::TestJapaneseFormat() {
622625
simpleTest(loc, expect, expectDate, status);
623626

624627
}
625-
if (!logKnownIssue("ICU-23341", "ICU needs to handle removal of data for pre-Meiji Japanese eras")) {
626-
// This Feb 29th falls on a leap year by gregorian year, but not by Japanese year.
627-
// When era for 1456 is deleted, format result will be different
628-
UnicodeString expect = CharsToUnicodeString("\\u5EB7\\u6B632\\u5e742\\u670829\\u65e5\\u65e5\\u66dc\\u65e5");
628+
if (!logKnownIssue("ICU-23108", "ICU needs to implement era inheritance")) {
629+
// 西暦1456年2月29日日曜日
630+
UnicodeString expect = CharsToUnicodeString("\\u897f\\u66a61456\\u5e742\\u670829\\u65e5\\u65e5\\u66dc\\u65e5");
629631
UDate expectDate = -16214400422000.0; // 1456-03-09T00:00Z-075258
630632
Locale loc("ja_JP@calendar=japanese");
631633

icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,9 +2480,7 @@ public void TestAddRollEra0AndEraBounds() {
24802480
TimeZone zoneGMT = TimeZone.getFrozenTimeZone("GMT");
24812481
for (String localeID : localeIDs) {
24822482
if (localeID.contains("calendar=japanese")
2483-
&& logKnownIssue(
2484-
"ICU-23341",
2485-
"ICU needs to handle removal of data for pre-Meiji Japanese eras")) {
2483+
&& logKnownIssue("ICU-23108", "ICU needs to implement era inheritance")) {
24862484
continue;
24872485
}
24882486
Calendar ucalTest = Calendar.getInstance(zoneGMT, new ULocale(localeID));

icu4j/main/core/src/test/java/com/ibm/icu/dev/test/calendar/JapaneseTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,15 @@ public void Test5345calendar() {
462462
int expectedA[] = {Calendar.ERA, JapaneseCalendar.MEIJI};
463463
checkExpected(c, expectedA);
464464

465-
if (!logKnownIssue(
466-
"ICU-23341", "ICU needs to handle removal of data for pre-Meiji Japanese eras")) {
465+
if (!logKnownIssue("ICU-23108", "ICU needs to implement era inheritance")) {
467466
logln("test setting era and year and month and date");
468467
c.clear();
469468
c.set(Calendar.ERA, JapaneseCalendar.MEIJI);
470469
c.set(Calendar.YEAR, 1);
471470
c.set(Calendar.MONTH, Calendar.JANUARY);
472471
c.set(Calendar.DATE, 1);
473472

474-
int expectedC[] = {Calendar.ERA, JapaneseCalendar.MEIJI - 1};
473+
int expectedC[] = {Calendar.ERA, JapaneseCalendar.AD};
475474
checkExpected(c, expectedC);
476475

477476
logln("test setting year and month and date THEN era");

0 commit comments

Comments
 (0)