From 70a50e8390d1d0260b81dc49b629db3069abe427 Mon Sep 17 00:00:00 2001 From: Eike Rathke <erack@redhat.com> Date: Sat, 24 Oct 2015 23:25:18 +0200 Subject: add delta for double comparison Change-Id: I008438a6b1651068165e6a07b16ea0b2e447074f --- sal/qa/rtl/math/test-rtl-math.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx index e3dcfec82bb2..aa7b213fdecd 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() { -- cgit