Kaydet (Commit) 5299400e authored tarafından Eike Rathke's avatar Eike Rathke

unit test for negative decimal places rounding, tdf#96918 related

Change-Id: Ib2f3ffaa7c4216b66479c750465c2beab927405a
üst fdf982f7
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment