[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Fri May 3 12:47:14 UTC 2019


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

New commits:
commit eaf70e004cf6d908b0cc3adcf523a22cd42b03ee
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 14:46:23 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>
    (cherry picked from commit d0aa53964c0dbc8dd6e1ee555f046c3e883e344d)
    Reviewed-on: https://gerrit.libreoffice.org/71734

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 074d7ad977c5..f5367bbfcf08 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -383,7 +383,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, ';');
@@ -391,7 +392,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