summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-05-06 19:01:26 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-05-07 08:07:40 +0200
commit4cec737a53c736bd38e81f7ba555c39117aaaf68 (patch)
treea462067110d83647e3f057cd7449b5332b85f75c /sal/qa
parent31e2b4746a4a5d7661c4aa8f6a4489e50982aede (diff)
Revert a thinko from commit 876010cbc4584249e919c694b8b977fd4e83084e
Indeed, the cDecSeparator and cGroupSeparator require that the buffer uses the proper character type, otherwise it won't be possible to use Unicode separators in rtl_math_doubleToUString. Change-Id: Id26bed72776475c1be5b092e3ffcff0e75ffe557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151451 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.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index 57ac2a2616f0..05879d567760 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -328,6 +328,14 @@ public:
'.', aGroups, ',', true);
CPPUNIT_ASSERT_EQUAL( OUString("1,000"), aRes);
+ // Check non-ASCII separators: Arabic decimal separator U+066B, thousand separator U+066C
+ fVal = 123456.78;
+ aRes = rtl::math::doubleToUString( fVal,
+ rtl_math_StringFormat_Automatic,
+ 2,
+ u'٫', aGroups, u'٬', true);
+ CPPUNIT_ASSERT_EQUAL( OUString(u"1٬23٬456٫78"), aRes);
+
fVal = 4503599627370495.0;
aRes = rtl::math::doubleToUString( fVal,
rtl_math_StringFormat_Automatic,