diff options
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r-- | sal/qa/rtl/math/test-rtl-math.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx index 47736f1986a3..3de49569a082 100644 --- a/sal/qa/rtl/math/test-rtl-math.cxx +++ b/sal/qa/rtl/math/test-rtl-math.cxx @@ -97,6 +97,20 @@ public: '.', aGroups, ',', true)); CPPUNIT_ASSERT_EQUAL( OUString("99,99,99,99,99,99,999"), aRes); + fVal = 949.0; + aRes = rtl::math::doubleToUString( fVal, + rtl_math_StringFormat_Automatic, + -2, // round before decimals + '.', aGroups, ',', true); + CPPUNIT_ASSERT_EQUAL( OUString("900"), aRes); + + fVal = 950.0; + aRes = rtl::math::doubleToUString( fVal, + rtl_math_StringFormat_Automatic, + -2, // round before decimals + '.', aGroups, ',', true); + CPPUNIT_ASSERT_EQUAL( OUString("1,000"), aRes); + fVal = 4503599627370495.0; aRes = rtl::math::doubleToUString( fVal, rtl_math_StringFormat_Automatic, |