summaryrefslogtreecommitdiff
path: root/dev-libs/icu/files/icu-73.2-fix-TestHebrewCalendarInTemporalLeapYear-test.patch
blob: df4dd07938379b3e9da6bbdc6bcc6d6fa7001934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
https://bugs.gentoo.org/914887
https://github.com/unicode-org/icu/commit/f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc

From f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc Mon Sep 17 00:00:00 2001
From: Frank Tang <ftang@chromium.org>
Date: Mon, 18 Sep 2023 20:20:42 -0700
Subject: [PATCH] ICU-22512 Fix broken TestHebrewCalendarInTemporalLeapYear

Fix broken test mistakenly landed in
https://github.com/unicode-org/icu/pull/2274

Some important steps were missed in the last landing.
--- a/test/intltest/caltest.cpp
+++ b/test/intltest/caltest.cpp
@@ -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);
@@ -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;
         }