Kaydet (Commit) d0aa5396 authored tarafından Michael Stahl's avatar Michael Stahl

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: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 89775fd3
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment