summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-03-15 10:54:23 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-03-15 15:48:11 +0000
commit2386279c4f0d91dc0758157578ecf62ae9e1ceaa (patch)
treeff3e72873acf7a1f9db89ddff3c6c86688b39e2c /svl/qa
parenteffc64f238bf0832229b7043dc8497a9cce5548a (diff)
tdf#117037: svl_qa_cppunit: Add unittest
Change-Id: I707f1a5402189a2453f5d11beb4e1c493699e28b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148909 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/unit/svl.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index a64abd5fa89f..557c9be639e6 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1173,14 +1173,15 @@ void Test::testIsNumberFormat()
{ "1999-11-23 12:34:56,789", false }, // comma not in en-US if 'T' separator is not present,
// debatable, 'T' "may be omitted by mutual consent of those
// interchanging data, if ambiguity can be avoided."
- { "1999-11-23T12:34:56/789", false }
+ { "1999-11-23T12:34:56/789", false },
+ { "−1000", true } // unicode minus
};
for (size_t i = 0; i < SAL_N_ELEMENTS(aTests); ++i)
{
sal_uInt32 nIndex = 0;
double nNumber = 0;
- OUString aString = OUString::createFromAscii(aTests[i].pFormat);
+ OUString aString = OUString::fromUtf8(aTests[i].pFormat);
bool bIsNumber = aFormatter.IsNumberFormat(aString, nIndex, nNumber);
CPPUNIT_ASSERT_EQUAL_MESSAGE(aTests[i].pFormat, aTests[i].bIsNumber, bIsNumber);