diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-03 11:33:29 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-03 14:46:23 +0200 |
commit | eaf70e004cf6d908b0cc3adcf523a22cd42b03ee (patch) | |
tree | 4c39438bb675aa2f556bf658270e8c2f61241ac2 | |
parent | d99e4864ef838093d47aa8f3c43403a082e26be2 (diff) |
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@cib.de>
(cherry picked from commit d0aa53964c0dbc8dd6e1ee555f046c3e883e344d)
Reviewed-on: https://gerrit.libreoffice.org/71734
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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); } } |