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

Eike Rathke erack at redhat.com
Sat Oct 24 21:26:19 UTC 2015


 sal/qa/rtl/math/test-rtl-math.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 70a50e8390d1d0260b81dc49b629db3069abe427
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Oct 24 23:25:18 2015 +0200

    add delta for double comparison
    
    Change-Id: I008438a6b1651068165e6a07b16ea0b2e447074f

diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index e3dcfec..aa7b213 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -104,7 +104,7 @@ public:
         CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
         x = 3.0;
         res = rtl::math::erf(-x);
-        CPPUNIT_ASSERT_EQUAL(-rtl::math::erf(x),res);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL( -rtl::math::erf(x), res, 1E-12);
     }
 
     void test_erfc() {
@@ -123,7 +123,7 @@ public:
         CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
         x = 3.0;
         res = rtl::math::erfc(-x);
-        CPPUNIT_ASSERT_EQUAL(2.0-rtl::math::erfc(x),res);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.0 - rtl::math::erfc(x), res, 1E-12);
     }
 
     void test_expm1() {


More information about the Libreoffice-commits mailing list