summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorBaiXiaochun <bai.xiaochun.mofan@protonmail.com>2021-06-29 20:31:30 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-07-01 00:39:17 +0200
commit3964e0854507b2696ae0fbe48a4fb005c779947e (patch)
tree0a0ae3cd2e8a20f67eb7303f643ab668e44e0ccb /basic
parent54d7fc9ea9d56ec16ec4f641a3dbf01f64233297 (diff)
Purge out rtl::math::setInf
Change-Id: I71af8273c672a4cbcbfefafffd0003ab266dcce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118132 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/test_scanner.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx
index 5663c44d027e..6459ab45f6b1 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -13,7 +13,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
-#include <rtl/math.hxx>
+#include <limits>
#include <scanner.hxx>
@@ -654,11 +654,9 @@ void ScannerTest::testNumbers()
// the buffer is artificially constrained by the scanner.
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned int>(errors)); // HACK
- double fInf = 0.0;
- rtl::math::setInf(&fInf, false);
symbols = getSymbols("10e308", errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(fInf, symbols[0].number);
+ CPPUNIT_ASSERT_EQUAL(std::numeric_limits<double>::infinity(), symbols[0].number);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned int>(errors)); // math error, overflow