Skip to content

Commit

Permalink
ICU-22512 Fix broken TestHebrewCalendarInTemporalLeapYear
Browse files Browse the repository at this point in the history
Fix broken test mistakenly landed in
#2274

Some important steps were missed in the last landing.
  • Loading branch information
FrankYFTang committed Sep 19, 2023
1 parent d8659b4 commit f3b869c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions icu4c/source/test/intltest/caltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4028,6 +4028,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() {
for (gc.set(startYear, UCAL_JANUARY, 1);
gc.get(UCAL_YEAR, status) <= stopYear;
gc.add(UCAL_DATE, incrementDays, status)) {
cal->setTime(gc.getTime(status), status);
if (failure(status, "add/get/set/getTime/setTime incorrect")) return;

int32_t cal_year = cal->get(UCAL_EXTENDED_YEAR, status);
Expand All @@ -4036,6 +4037,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() {
leapTest->set(UCAL_MONTH, 0);
leapTest->set(UCAL_DATE, 1);
// If 10 months after TISHRI is TAMUZ, then it is a leap year.
leapTest->add(UCAL_MONTH, 10, status);
hasLeapMonth = leapTest->get(UCAL_MONTH, status) == icu::HebrewCalendar::TAMUZ;
yearForHasLeapMonth = cal_year;
}
Expand Down

0 comments on commit f3b869c

Please sign in to comment.