[Libreoffice-commits] core.git: sw/qa

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Fri May 3 11:10:58 UTC 2019


 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d0aa53964c0dbc8dd6e1ee555f046c3e883e344d
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri May 3 11:33:29 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri May 3 13:09:35 2019 +0200

    sw: reduce accuracy of double compares in testFDO74215
    
    This failed several times recently on Mac in Jenkins.
    
    - Expected: 14.7945205479452
    - Actual  : 14.8
    - Delta   : 0.001
    
    Change-Id: I966b8085bf4120afb0a09e50f85ada4e5d8d488c
    Reviewed-on: https://gerrit.libreoffice.org/71725
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 3e90fe359865..9405ff7e29bc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -356,7 +356,8 @@ DECLARE_OOXMLEXPORT_TEST(testFDO74215, "FDO74215.docx")
         CPPUNIT_ASSERT(sWidth.endsWith("pt"));
         const double fWidth = sWidth.copy(6, sWidth.getLength() - 8).toDouble();
         const double fXScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIX();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fXScaleFactor, fWidth, 0.001);
+        // note: used to fail on Mac with 14.7945205479452 vs. 14.8
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fXScaleFactor, fWidth, 0.01);
     }
     {
         const OUString sHeight = sStyle.getToken(1, ';');
@@ -364,7 +365,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO74215, "FDO74215.docx")
         CPPUNIT_ASSERT(sHeight.endsWith("pt"));
         const double fHeight = sHeight.copy(7, sHeight.getLength() - 9).toDouble();
         const double fYScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIY();
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fYScaleFactor, fHeight, 0.001);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fYScaleFactor, fHeight, 0.01);
     }
 }
 


More information about the Libreoffice-commits mailing list