Accepting request 882713 from 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/882713 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/icu?expand=0&rev=79
This commit is contained in:
commit
a3c51a91b4
59
icu-drop-testTemperature.patch
Normal file
59
icu-drop-testTemperature.patch
Normal file
@ -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");
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 31 16:19:02 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||||
|
|
||||||
|
- 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 <guillaume.gardet@opensuse.org>
|
Mon Mar 8 07:33:00 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||||
|
|
||||||
|
9
icu.spec
9
icu.spec
@ -45,6 +45,8 @@ Patch6: icu-error-reporting.diff
|
|||||||
Patch7: icu-avoid-x87-excess-precision.diff
|
Patch7: icu-avoid-x87-excess-precision.diff
|
||||||
Patch8: locale.diff
|
Patch8: locale.diff
|
||||||
Patch9: icu-1618.patch
|
Patch9: icu-1618.patch
|
||||||
|
# boo#1182645
|
||||||
|
Patch10: icu-drop-testTemperature.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
@ -132,8 +134,11 @@ and locale support.
|
|||||||
This package contains the HTML documentation.
|
This package contains the HTML documentation.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn icu
|
%autosetup -p1 -n icu
|
||||||
%autopatch -p1
|
%ifnarch aarch64 ppc64 ppc64le
|
||||||
|
%patch -P 10 -R -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
# docs are special
|
# docs are special
|
||||||
mkdir html
|
mkdir html
|
||||||
pushd html/
|
pushd html/
|
||||||
|
Loading…
Reference in New Issue
Block a user