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

Eike Rathke erack at redhat.com
Sat Oct 24 20:27:05 UTC 2015


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

New commits:
commit 5f7bc190b0f27fc58d26a6342eed9ead69a25808
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Oct 24 22:26:03 2015 +0200

    test oddness of rtl_math_erf() and rtl_math_erfc()
    
    Change-Id: I12f38d29d1d0b02b8a99977a232646c213ef20e9

diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index 1d3f07f..e3dcfec 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -102,6 +102,9 @@ public:
         rtl::math::setNan( &x);
         res = rtl::math::erf(x);
         CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(x));
+        x = 3.0;
+        res = rtl::math::erf(-x);
+        CPPUNIT_ASSERT_EQUAL(-rtl::math::erf(x),res);
     }
 
     void test_erfc() {
@@ -118,6 +121,9 @@ public:
         rtl::math::setNan( &x);
         res = rtl::math::erfc(x);
         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);
     }
 
     void test_expm1() {


More information about the Libreoffice-commits mailing list