SHA256
1
0
forked from pool/icu

Accepting request 1112123 from home:AndreasStieger:branches:X11:common:Factory

- Fix broken TestHebrewCalendarInTemporalLeapYear [boo#1215425]

OBS-URL: https://build.opensuse.org/request/show/1112123
OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=172
This commit is contained in:
Dirk Mueller 2023-09-19 16:55:13 +00:00 committed by Git OBS Bridge
parent 5d91a6fd63
commit 092e2998c7
3 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 19 05:46:14 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- Fix broken TestHebrewCalendarInTemporalLeapYear [boo#1215425]
icu4c-73_c-ICU-22512-Fix-broken-TestHebrewCalendarInTemporalLeapYear.patch
-------------------------------------------------------------------
Wed Jun 14 00:08:48 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

View File

@ -43,6 +43,7 @@ Patch6: icu-error-reporting.diff
Patch7: icu-avoid-x87-excess-precision.diff
Patch8: locale.diff
Patch9: nan-undefined-conversion.patch
Patch10: icu4c-73_c-ICU-22512-Fix-broken-TestHebrewCalendarInTemporalLeapYear.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkg-config

View File

@ -0,0 +1,33 @@
From b6b3e89231a623441940889b5badd90f74bdce2b 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.
---
icu4c/source/test/intltest/caltest.cpp | 2 ++
1 file changed, 2 insertions(+)
Index: icu/source/test/intltest/caltest.cpp
===================================================================
--- icu.orig/source/test/intltest/caltest.cpp
+++ icu/source/test/intltest/caltest.cpp
@@ -3998,6 +3998,7 @@ void CalendarTest::TestHebrewCalendarInT
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);
@@ -4006,6 +4007,7 @@ void CalendarTest::TestHebrewCalendarInT
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;
}