vcl/qa/cppunit/pdfexport/pdfexport2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fe9dab32a3083059f46aba1ba5eab5840c2d07b5 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Oct 9 15:11:18 2024 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Wed Oct 9 23:06:26 2024 +0200 CppunitTest_vcl_pdfexport2: relax testPdfImageHyperlink a bit This will start to fail on pdfium-6764 with: pdfexport2.cxx:4186:Assertion Test name: (anonymous namespace)::testPdfImageHyperlink::TestBody equality assertion failed - Expected: 0.0012626264 - Actual : 0.0012626261 But the original problem was that the repriprocal was just 0.00126. If we require one less digit, 1/0.001262626 is 792.0001647360343 and 1/0.0012626264 is 791.9999138304095, so the original problem that the rounded result is 794 points (and not 792) is still tested. Change-Id: Ia4489625fd25eca971261b14005b10bbf34343eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174724 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index 5e59ec0373f1..59c96bb72ba5 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx @@ -4183,7 +4183,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageHyperlink) // - Expected: 0.0012626264 // - Actual : 0.00126 // i.e. the rounded reciprocal was 794 points, not the original 792. - CPPUNIT_ASSERT_EQUAL(0.0012626264, rtl::math::round(aScale.getY(), 10)); + CPPUNIT_ASSERT_EQUAL(0.001262626, rtl::math::round(aScale.getY(), 9)); } CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
