summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-27 23:44:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-28 08:27:11 +0200
commitc9f3277ea7bb22c395e8938168ce4df9101f7850 (patch)
treeb155ca6e534e751cd2c4ba4b2ead8a181bbafa22 /starmath/qa
parent0fa21336428b286d69684cfbb7b845f123657041 (diff)
loplugin:stringconstant: Simplify construction of non-ASCII OUString
Change-Id: If80c53978106789824e6154db396baeecc1969dd Reviewed-on: https://gerrit.libreoffice.org/42876 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index aec16ea30738..dee561d371aa 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -667,12 +667,9 @@ void Test::testMiscEquivalent()
void Test::testParser()
{
- char const* const formula = "{ \xf0\x9d\x91\x8e }"; // non-BMP Unicode
- char const* const expected = "\xf0\x9d\x91\x8e";
-
OUString sOutput;
- OUString sInput = OUString(formula, strlen(formula), RTL_TEXTENCODING_UTF8);
- OUString sExpected = OUString(expected, strlen(expected), RTL_TEXTENCODING_UTF8);
+ OUString sInput(u"{ \U0001D44E }"); // non-BMP Unicode
+ OUString sExpected(u"\U0001D44E");
std::unique_ptr<SmNode> pNode(SmParser().ParseExpression(sInput));
pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmNodeToTextVisitor(pNode.get(), sOutput);