From 704343381e435b306648a2d85a77a58e34478643 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 29 Oct 2023 09:35:43 +0000 Subject: gentoo auto-resync : 29:10:2023 - 09:35:42 --- ...st-Fixed-test-under-linux-when-compiled-w.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 app-text/podofo/files/0001-FIX-ColorTest-Fixed-test-under-linux-when-compiled-w.patch (limited to 'app-text/podofo/files') diff --git a/app-text/podofo/files/0001-FIX-ColorTest-Fixed-test-under-linux-when-compiled-w.patch b/app-text/podofo/files/0001-FIX-ColorTest-Fixed-test-under-linux-when-compiled-w.patch new file mode 100644 index 000000000000..45edd8454dfb --- /dev/null +++ b/app-text/podofo/files/0001-FIX-ColorTest-Fixed-test-under-linux-when-compiled-w.patch @@ -0,0 +1,37 @@ +https://github.com/podofo/podofo/commit/da91101b7afafa958669e11d0cabaeee3ff50b39 + +From da91101b7afafa958669e11d0cabaeee3ff50b39 Mon Sep 17 00:00:00 2001 +From: Francesco Pretto +Date: Fri, 27 Oct 2023 23:41:22 +0200 +Subject: [PATCH] [FIX] ColorTest: Fixed test under linux when compiled with + -march=x86-64-v3 + +Floating point contractions may cause some level of non determinsm when comparing the result of fp operations . See +https://stackoverflow.com/questions/62353629/does-the-same-floating-point-calculation-producing-different-results-when-perfor + +Fixes #103 +--- + test/unit/ColorTest.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/test/unit/ColorTest.cpp b/test/unit/ColorTest.cpp +index 419052a7..81f99c5b 100644 +--- a/test/unit/ColorTest.cpp ++++ b/test/unit/ColorTest.cpp +@@ -426,7 +426,12 @@ TEST_CASE("testCMYKConstructor") + double dGreen = M_VALUE * (1.0 - B_VALUE) + B_VALUE; + double dBlue = Y_VALUE * (1.0 - B_VALUE) + B_VALUE; + +- REQUIRE(color.ConvertToRGB() == PdfColor(1.0 - dRed, 1.0 - dGreen, 1.0 - dBlue)); ++ auto rgb1 = color.ConvertToRGB(); ++ PdfColor rgb2(1.0 - dRed, 1.0 - dGreen, 1.0 - dBlue); ++ ++ ASSERT_EQUAL(rgb1.GetRed(), rgb2.GetRed()); ++ ASSERT_EQUAL(rgb1.GetGreen(), rgb2.GetGreen()); ++ ASSERT_EQUAL(rgb1.GetBlue(), rgb2.GetBlue()); + } + + REQUIRE(color.ConvertToCMYK() == PdfColor(C_VALUE, M_VALUE, Y_VALUE, B_VALUE)); +-- +2.41.0 + -- cgit v1.2.3