summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorYukio Siraichi <yukio.siraichi@gmail.com>2020-03-14 02:33:55 +0900
committerMike Kaganski <mike.kaganski@collabora.com>2020-03-14 09:10:34 +0100
commit8f8b64cad377c6d767cdf291fd00225658bd02c5 (patch)
treede5f87582bf88b030f57742109aaa289f18e428c /sal/qa
parent2eb0e7594cc875dd0960822d9403b573ac00f739 (diff)
tdf#130974 replace `rtl::math::isSignBitSet` with `std::signbit`.
Change-Id: I91235eee8c6a9d4a59c1933527b49141f64cd91b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/rtl/math/test-rtl-math.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index 43d8e90afffc..df899634892e 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -173,7 +173,7 @@ public:
CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), end);
CPPUNIT_ASSERT_EQUAL(0.0, res);
- CPPUNIT_ASSERT(rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(std::signbit(res));
// Compensating: "0.001E311" is 1E308, not overflow/inf
res = rtl::math::stringToDouble(OUString("0.001E311"), '.', ',', &status, &end);
@@ -399,10 +399,10 @@ public:
x = -0.0;
res = rtl::math::expm1(x);
CPPUNIT_ASSERT_EQUAL(-0.0,res);
- CPPUNIT_ASSERT_EQUAL(true, rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(std::signbit(res));
rtl::math::setInf( &x, false);
res = rtl::math::expm1(x);
- CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && !rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && !std::signbit(res));
rtl::math::setInf( &x, true);
res = rtl::math::expm1(x);
CPPUNIT_ASSERT_EQUAL(-1.0,res);
@@ -419,13 +419,13 @@ public:
x = -0.0;
res = rtl::math::log1p(x);
CPPUNIT_ASSERT_EQUAL(-0.0,res);
- CPPUNIT_ASSERT_EQUAL(true, rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(std::signbit(res));
rtl::math::setInf( &x, false);
res = rtl::math::log1p(x);
- CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && !rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && !std::signbit(res));
x = -1.0;
res = rtl::math::log1p(x);
- CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT_EQUAL(true, std::isinf(res) && std::signbit(res));
x = -1.1;
res = rtl::math::log1p(x);
CPPUNIT_ASSERT_EQUAL(true, rtl::math::isNan(res));
@@ -452,7 +452,7 @@ public:
CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::acosh(1.0));
res = rtl::math::acosh(std::numeric_limits<double>::infinity()); // +Inf
- CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(!std::signbit(res));
CPPUNIT_ASSERT(std::isinf(res));
// #i97605
@@ -464,13 +464,13 @@ public:
double res;
res = rtl::math::asinh(-std::numeric_limits<double>::infinity()); // -Inf
- CPPUNIT_ASSERT(rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(std::signbit(res));
CPPUNIT_ASSERT(std::isinf(res));
CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::asinh(0.0));
res = rtl::math::asinh(std::numeric_limits<double>::infinity()); // +Inf
- CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(!std::signbit(res));
CPPUNIT_ASSERT(std::isinf(res));
// #i97605
@@ -491,13 +491,13 @@ public:
CPPUNIT_ASSERT(rtl::math::isNan(res));
res = rtl::math::atanh(-1.0); // -Inf
- CPPUNIT_ASSERT(rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(std::signbit(res));
CPPUNIT_ASSERT(std::isinf(res));
CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::atanh(0.0));
res = rtl::math::atanh(1.0); // +Inf
- CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res));
+ CPPUNIT_ASSERT(!std::signbit(res));
CPPUNIT_ASSERT(std::isinf(res));
res = rtl::math::atanh(2.0); // NaN