From 4dc49ebbfab8bada84a2923a16c28124d07da729157ad11765c86a09174a6215 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 31 Mar 2021 17:49:48 +0000 Subject: [PATCH] Accepting request 882420 from home:Guillaume_G:branches:X11:common:Factory - Add icu-drop-testTemperature.patch to fix boo#1182645 The test has been dropped in master branch OBS-URL: https://build.opensuse.org/request/show/882420 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=143 --- icu-drop-testTemperature.patch | 59 ++++++++++++++++++++++++++++++++++ icu.changes | 6 ++++ icu.spec | 2 ++ 3 files changed, 67 insertions(+) create mode 100644 icu-drop-testTemperature.patch diff --git a/icu-drop-testTemperature.patch b/icu-drop-testTemperature.patch new file mode 100644 index 0000000..7a932bf --- /dev/null +++ b/icu-drop-testTemperature.patch @@ -0,0 +1,59 @@ +--- icu/source/test/intltest/units_test.cpp.orig 2021-03-31 18:16:45.625488752 +0200 ++++ icu/source/test/intltest/units_test.cpp 2021-03-31 18:26:44.059315511 +0200 +@@ -50,7 +50,6 @@ class UnitsTest : public IntlTest { + void testPreferences(); + void testSiPrefixes(); + void testMass(); +- void testTemperature(); + void testArea(); + }; + +@@ -69,7 +68,6 @@ void UnitsTest::runIndexedTest(int32_t i + TESTCASE_AUTO(testPreferences); + TESTCASE_AUTO(testSiPrefixes); + TESTCASE_AUTO(testMass); +- TESTCASE_AUTO(testTemperature); + TESTCASE_AUTO(testArea); + TESTCASE_AUTO_END; + } +@@ -224,40 +222,6 @@ void UnitsTest::testMass() { + } + } + +-void UnitsTest::testTemperature() { +- IcuTestErrorCode status(*this, "Units testTemperature"); +- // Test Cases +- struct TestCase { +- const char *source; +- const char *target; +- const double inputValue; +- const double expectedValue; +- } testCases[]{ +- {"celsius", "fahrenheit", 0.0, 32.0}, // +- {"celsius", "fahrenheit", 10.0, 50.0}, // +- {"fahrenheit", "celsius", 32.0, 0.0}, // +- {"fahrenheit", "celsius", 89.6, 32}, // +- {"kelvin", "fahrenheit", 0.0, -459.67}, // +- {"kelvin", "fahrenheit", 300, 80.33}, // +- {"kelvin", "celsius", 0.0, -273.15}, // +- {"kelvin", "celsius", 300.0, 26.85} // +- }; +- +- for (const auto &testCase : testCases) { +- UErrorCode status = U_ZERO_ERROR; +- +- MeasureUnitImpl source = MeasureUnitImpl::forIdentifier(testCase.source, status); +- MeasureUnitImpl target = MeasureUnitImpl::forIdentifier(testCase.target, status); +- +- ConversionRates conversionRates(status); +- UnitConverter converter(source, target, conversionRates, status); +- +- assertEqualsNear(UnicodeString("testTemperature: ") + testCase.source + " to " + testCase.target, +- testCase.expectedValue, converter.convert(testCase.inputValue), +- 0.0001 * uprv_fabs(testCase.expectedValue)); +- } +-} +- + void UnitsTest::testArea() { + IcuTestErrorCode status(*this, "Units Area"); + diff --git a/icu.changes b/icu.changes index dd9c425..5e65bd1 100644 --- a/icu.changes +++ b/icu.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 31 16:19:02 UTC 2021 - Guillaume GARDET + +- Add icu-drop-testTemperature.patch to fix boo#1182645 + The test has been dropped in master branch + ------------------------------------------------------------------- Mon Mar 8 07:33:00 UTC 2021 - Guillaume GARDET diff --git a/icu.spec b/icu.spec index 55dccde..a14c46f 100644 --- a/icu.spec +++ b/icu.spec @@ -45,6 +45,8 @@ Patch6: icu-error-reporting.diff Patch7: icu-avoid-x87-excess-precision.diff Patch8: locale.diff Patch9: icu-1618.patch +# boo#1182645 +Patch10: icu-drop-testTemperature.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkg-config