summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-03-08 17:35:42 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-09 17:47:12 +0100
commit2dc105d9742814f9627d91232a47913ee105b103 (patch)
tree56f60d93ee955d694a8f4a7fede1aea17dfa890d /starmath/qa
parent3dfe1df0f1084b06c7d4c95df387253b2e058cd6 (diff)
Rename SmParser to SmParser5
Change-Id: I6983dd4c187fc7114546e87c66dc2c011fccd3e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx8
-rw-r--r--starmath/qa/cppunit/test_node.cxx2
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx20
-rw-r--r--starmath/qa/cppunit/test_parse.cxx4
4 files changed, 17 insertions, 17 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 720a885be3a3..1d5e5fad6d04 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -67,7 +67,7 @@ void Test::tearDown()
void Test::testCopyPaste()
{
- auto xTree = SmParser().Parse("a * b + c");
+ auto xTree = SmParser5().Parse("a * b + c");
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -89,7 +89,7 @@ void Test::testCopyPaste()
void Test::testCopySelectPaste()
{
- auto xTree = SmParser().Parse("a * b + c");
+ auto xTree = SmParser5().Parse("a * b + c");
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -115,7 +115,7 @@ void Test::testCopySelectPaste()
void Test::testCutPaste()
{
- auto xTree = SmParser().Parse("a * b + c");
+ auto xTree = SmParser5().Parse("a * b + c");
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
@@ -137,7 +137,7 @@ void Test::testCutPaste()
void Test::testCutSelectPaste()
{
- auto xTree = SmParser().Parse("a * b + c");
+ auto xTree = SmParser5().Parse("a * b + c");
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
diff --git a/starmath/qa/cppunit/test_node.cxx b/starmath/qa/cppunit/test_node.cxx
index e543ac04027c..c51b86759879 100644
--- a/starmath/qa/cppunit/test_node.cxx
+++ b/starmath/qa/cppunit/test_node.cxx
@@ -64,7 +64,7 @@ void NodeTest::tearDown()
void NodeTest::testTdf47813()
{
- SmParser aParser;
+ SmParser5 aParser;
#define MATRIX "matrix {-2#33##4#-5##6,0#7}"
auto pNodeA = aParser.Parse(MATRIX);
auto pNodeC = aParser.Parse("alignc " MATRIX);
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 70cc01512f92..5d1694197b30 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -442,12 +442,12 @@ void Test::parseandparseagain(const char* formula, const char* test_name)
// parse 1
OUString input = OUString::createFromAscii(formula);
- auto pNode1 = SmParser().ParseExpression(input);
+ auto pNode1 = SmParser5().ParseExpression(input);
pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode1.get(), output1);
// parse 2
- auto pNode2 = SmParser().ParseExpression(output1);
+ auto pNode2 = SmParser5().ParseExpression(output1);
pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode2.get(), output2);
@@ -466,7 +466,7 @@ void Test::ParseAndCheck(const char* formula, const char* expected, const char*
// parse
OUString sInput = OUString::createFromAscii(formula);
- auto pNode = SmParser().ParseExpression(sInput);
+ auto pNode = SmParser5().ParseExpression(sInput);
pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode.get(), sOutput);
@@ -486,13 +486,13 @@ void Test::ParseAndCompare(const char* formula1, const char* formula2, const cha
// parse formula1
OUString sInput1(formula1, strlen(formula1), RTL_TEXTENCODING_UTF8);
- auto pNode1 = SmParser().ParseExpression(sInput1);
+ auto pNode1 = SmParser5().ParseExpression(sInput1);
pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode1.get(), sOutput1);
// parse formula2
OUString sInput2(formula2, strlen(formula2), RTL_TEXTENCODING_UTF8);
- auto pNode2 = SmParser().ParseExpression(sInput2);
+ auto pNode2 = SmParser5().ParseExpression(sInput2);
pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode2.get(), sOutput2);
@@ -510,7 +510,7 @@ void Test::testBinomInBinHor()
// set up a binom (table) node
sInput += "binom a b + c";
- auto pTree = SmParser().Parse(sInput);
+ auto pTree = SmParser5().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree.get(), xDocShRef.get());
@@ -535,7 +535,7 @@ void Test::testBinVerInUnary()
// set up a unary operator with operand
sInput += "- 1";
- auto pTree = SmParser().Parse(sInput);
+ auto pTree = SmParser5().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree.get(), xDocShRef.get());
@@ -561,7 +561,7 @@ void Test::testBinVerInUnary()
void Test::testBinHorInSubSup()
{
// set up a blank formula
- auto pTree = SmParser().Parse(OUString());
+ auto pTree = SmParser5().Parse(OUString());
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree.get(), xDocShRef.get());
@@ -586,7 +586,7 @@ void Test::testBinHorInSubSup()
void Test::testUnaryInMixedNumberAsNumerator()
{
// set up a unary operator
- auto pTree = SmParser().Parse("- 1");
+ auto pTree = SmParser5().Parse("- 1");
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree.get(), xDocShRef.get());
@@ -652,7 +652,7 @@ void Test::testMiscEquivalent()
void Test::testParser()
{
OUString sOutput;
- auto pNode = SmParser().ParseExpression(u"{ \U0001D44E }"); // non-BMP Unicode
+ auto pNode = SmParser5().ParseExpression(u"{ \U0001D44E }"); // non-BMP Unicode
pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode.get(), sOutput);
CPPUNIT_ASSERT_EQUAL(OUString(u"\U0001D44E"), sOutput);
diff --git a/starmath/qa/cppunit/test_parse.cxx b/starmath/qa/cppunit/test_parse.cxx
index ccc0f5478c2c..daa236105b9f 100644
--- a/starmath/qa/cppunit/test_parse.cxx
+++ b/starmath/qa/cppunit/test_parse.cxx
@@ -65,7 +65,7 @@ void ParseTest::tearDown()
*/
void ParseTest::testMinus()
{
- auto pNode = SmParser().Parse("-1.2");
+ auto pNode = SmParser5().Parse("-1.2");
CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes());
const SmNode *pNode0 = pNode->GetSubNode(0);
CPPUNIT_ASSERT(pNode0);
@@ -98,7 +98,7 @@ void ParseTest::testMinus()
*/
void ParseTest::testNospace()
{
- auto pNode = SmParser().Parse("nospace{ nitalic d {F(x) G(x)} }");
+ auto pNode = SmParser5().Parse("nospace{ nitalic d {F(x) G(x)} }");
CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes());
const SmNode *pNode0 = pNode->GetSubNode(0);
CPPUNIT_ASSERT(pNode0);