summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-30 09:13:27 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-30 09:57:59 +0200
commit23e50bc96b3244975543f9d1ffbc3610f0ac7313 (patch)
tree1338802e486b0218173c437d225a8442d495c124 /sal/qa
parented166025123a403fbd679377387a45e097f09d6e (diff)
Add a test for a negative integer
Change-Id: I368123ce4ffdfb0e5c47e80cf4fece0c6ddc5f9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122854 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.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index f6ab314fbd21..971b9d7a55d1 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -351,6 +351,12 @@ public:
2, '.');
CPPUNIT_ASSERT_EQUAL( OUString("4503599627370496.00"), aRes);
+ fVal = -4503599627370496.0;
+ aRes = rtl::math::doubleToUString( fVal,
+ rtl_math_StringFormat_Automatic,
+ 2, '.');
+ CPPUNIT_ASSERT_EQUAL( OUString("-4503599627370496.00"), aRes);
+
fVal = 9007199254740991.0; // (2^53)-1
aRes = rtl::math::doubleToUString( fVal,
rtl_math_StringFormat_Automatic,