diff options
author | Eike Rathke <erack@redhat.com> | 2015-10-26 23:07:18 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-10-26 23:10:18 +0100 |
commit | 222b2f9370bfc05473249ab3f78e9adca67754bf (patch) | |
tree | 022039865a01084b45d4c3587eb9ee6d36e57e31 /sc | |
parent | fd9d9976bf346929d872db0e5d8abc4180c9996c (diff) |
let see if this works on 32-bit crap
... without actually disabling the test for 0.0 for others.
Change-Id: I014278dd38535274274536e3187d6bb8cd4dbc2a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 3c23d47f774d..c9815a77bacc 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -6596,8 +6596,18 @@ void Test::testFuncMDETERM() aFormulaBuffer[12] = aColCodes[nSize-1]; aFormulaBuffer[13] = static_cast<sal_Unicode>( '0' + nSize ); m_pDoc->SetString(aPos, aFormulaBuffer.toString()); + + // On crappy 32-bit targets, presumably without extended precision on + // interim results or optimization not catching it, this test fails + // when comparing to 0.0, so have a narrow error margin. See also + // commit message of 8140309d636d4a870875f2dd75ed3dfff2c0fbaf +#if SAL_TYPES_SIZEOFPOINTER == 4 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of MDETERM incorrect for singular integer matrix", - 0.0, m_pDoc->GetValue(aPos), 10e-4); + 0.0, m_pDoc->GetValue(aPos), 1e-12); +#else + CPPUNIT_ASSERT_EQUAL_MESSAGE("Calculation of MDETERM incorrect for singular integer matrix", + 0.0, m_pDoc->GetValue(aPos)); +#endif } int aVals[] = {23, 31, 13, 12, 34, 64, 34, 31, 98, 32, 33, 63, 45, 54, 65, 76}; |