summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-06 09:42:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-07 00:47:20 +0200
commite0c33ec15f53a01fa3ee07489871bbe09bb5c9c3 (patch)
tree1afe391a2b4bf9eda13de043658941060cb401c2 /starmath/qa
parent9e3da252c361b3e2b04a2df7a3ae2a5177b37713 (diff)
loplugin:ostr: automatic rewrite
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx4
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx4
-rw-r--r--starmath/qa/extras/mmlexport-test.cxx8
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx10
4 files changed, 13 insertions, 13 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 114ea791fbd3..12e63626eee3 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -176,7 +176,7 @@ void Test::testCutSelectPaste()
void Test::testSelectSurrogatePairs()
{
- auto xTree = SmParser5().Parse(u"\U0001EE4E");
+ auto xTree = SmParser5().Parse(u"\U0001EE4E"_ustr);
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -188,7 +188,7 @@ void Test::testSelectSurrogatePairs()
aCursor.Paste();
#ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason
- CPPUNIT_ASSERT_EQUAL(OUString(u"\U0001EE4E"), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL(u"\U0001EE4E"_ustr, xDocShRef->GetText());
#endif
}
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index aba582e281d3..1b8c0292ba31 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -655,10 +655,10 @@ void Test::testMiscEquivalent()
void Test::testParser()
{
OUString sOutput;
- auto pNode = SmParser5().ParseExpression(u"{ \U0001D44E }"); // non-BMP Unicode
+ auto pNode = SmParser5().ParseExpression(u"{ \U0001D44E }"_ustr); // non-BMP Unicode
pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode.get(), sOutput);
- CPPUNIT_ASSERT_EQUAL(OUString(u"\U0001D44E"), sOutput);
+ CPPUNIT_ASSERT_EQUAL(u"\U0001D44E"_ustr, sOutput);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/starmath/qa/extras/mmlexport-test.cxx b/starmath/qa/extras/mmlexport-test.cxx
index 615dcd7dfa98..98607dbec3f2 100644
--- a/starmath/qa/extras/mmlexport-test.cxx
+++ b/starmath/qa/extras/mmlexport-test.cxx
@@ -126,12 +126,12 @@ void MathMLExportTest::testMaj()
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(
- u"maj to { \u0661 } from { \U0001EE0A = \u0660 } { \u0661 over \U0001EE0A }");
+ u"maj to { \u0661 } from { \U0001EE0A = \u0660 } { \u0661 over \U0001EE0A }"_ustr);
save("MathML XML (Math)");
xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo", "stretchy", "false");
- assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo", u"\U0001EEF0");
+ assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo", u"\U0001EEF0"_ustr);
}
void MathMLExportTest::testHadd()
@@ -139,11 +139,11 @@ void MathMLExportTest::testHadd()
mxComponent = loadFromDesktop("private:factory/smath");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
- pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E");
+ pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr);
save("MathML XML (Math)");
xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc);
- assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi", u"\U0001EEF1");
+ assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi", u"\U0001EEF1"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(MathMLExportTest);
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index c6edd0b6481e..f691fdbef64c 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -178,7 +178,7 @@ void Test::testMathmlEntities()
loadFromURL(u"mthmlentities.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
- CPPUNIT_ASSERT_EQUAL(OUString(u"{ \u03C3 \u221E \u221E \u03C3 }"), pDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL(u"{ \u03C3 \u221E \u221E \u03C3 }"_ustr, pDocShell->GetText());
}
void Test::testMaj()
@@ -188,8 +188,8 @@ void Test::testMaj()
CPPUNIT_ASSERT(pModel);
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT(pDocShell);
- CPPUNIT_ASSERT_EQUAL(OUString(u"{ maj csup \u0661 csub { nitalic \U0001EE0A = \u0660 } { frac "
- u"{ \u0661 } { nitalic \U0001EE0A } } }"),
+ CPPUNIT_ASSERT_EQUAL(u"{ maj csup \u0661 csub { nitalic \U0001EE0A = \u0660 } { frac "
+ u"{ \u0661 } { nitalic \U0001EE0A } } }"_ustr,
pDocShell->GetText());
}
@@ -200,8 +200,8 @@ void Test::testHadd()
CPPUNIT_ASSERT(pModel);
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT(pDocShell);
- CPPUNIT_ASSERT_EQUAL(OUString(u"{ nitalic \U0001EEF1 csup nitalic \U0001EE4E csub nitalic "
- u"\U0001EE4E nitalic \U0001EE4E }"),
+ CPPUNIT_ASSERT_EQUAL(u"{ nitalic \U0001EEF1 csup nitalic \U0001EE4E csub nitalic "
+ u"\U0001EE4E nitalic \U0001EE4E }"_ustr,
pDocShell->GetText());
}