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

Eike Rathke erack at redhat.com
Mon Oct 26 15:11:32 PDT 2015


 sc/qa/unit/ucalc_formula.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 222b2f9370bfc05473249ab3f78e9adca67754bf
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Oct 26 23:07:18 2015 +0100

    let see if this works on 32-bit crap
    
    ... without actually disabling the test for 0.0 for others.
    
    Change-Id: I014278dd38535274274536e3187d6bb8cd4dbc2a

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 3c23d47..c9815a7 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};


More information about the Libreoffice-commits mailing list