summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx8
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx32
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx46
3 files changed, 43 insertions, 43 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 200af93f2849..8cf0bced8eb8 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -84,7 +84,7 @@ void Test::testCopyPaste()
aCursor.Move(pOutputDevice, MoveRight);
aCursor.Paste();
- CPPUNIT_ASSERT_EQUAL(OUString(" { a * b + c * b } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("{ a * b + c * b }"), xDocShRef->GetText());
}
void Test::testCopySelectPaste()
@@ -110,7 +110,7 @@ void Test::testCopySelectPaste()
aCursor.Move(pOutputDevice, MoveRight, false);
aCursor.Paste();
- CPPUNIT_ASSERT_EQUAL(OUString(" { b + c * b + c } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("{ b + c * b + c }"), xDocShRef->GetText());
}
void Test::testCutPaste()
@@ -132,7 +132,7 @@ void Test::testCutPaste()
aCursor.Move(pOutputDevice, MoveRight);
aCursor.Paste();
- CPPUNIT_ASSERT_EQUAL(OUString(" { a + c * b } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("{ a + c * b }"), xDocShRef->GetText());
}
void Test::testCutSelectPaste()
@@ -158,7 +158,7 @@ void Test::testCutSelectPaste()
aCursor.Move(pOutputDevice, MoveRight, false);
aCursor.Paste();
- CPPUNIT_ASSERT_EQUAL(OUString(" { b + c * } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("{ b + c * }"), xDocShRef->GetText());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 0faf69ee9d87..72a78abaf1d5 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -114,16 +114,16 @@ void Test::SimpleUnaryOp()
parseandparseagain("-+4", "Minus/plus");
parseandparseagain("neg a", "Boolean 'not'");
parseandparseagain("fact a", "Factorial");
- parseandparseagain(" - { 1 over 2 } ", "BinVer in Unary 1");
- ParseAndCheck(" - { 1 over 2 } ", " - { 1 over 2 } ", "BinVer in Unary 1");
- parseandparseagain(" { - { 1 over 2 } } ", "BinVer in Unary 2");
- parseandparseagain(" - 1 over 2 ", "Unary in BinVer as numerator 1");
- parseandparseagain(" { - 1 } over 2 ", "Unary in BinVer as numerator 2");
- parseandparseagain(" 1 over - 2 ", "Unary in BinVer as denominator 1");
- parseandparseagain(" 1 over { - 2 } ", "Unary in BinVer as denominator 2");
- parseandparseagain(" 2 { - 1 over 2 } ", "Mixed number with Unary in denominator 1");
- parseandparseagain(" 2 { - 1 } over 2 ", "Mixed number with Unary in denominator 2");
- parseandparseagain(" - 1 + 2 ", "Unary in BinHor");
+ parseandparseagain("- { 1 over 2 }", "BinVer in Unary 1");
+ ParseAndCheck("- { 1 over 2 }", "- { 1 over 2 }", "BinVer in Unary 1");
+ parseandparseagain("{- { 1 over 2 } }", "BinVer in Unary 2");
+ parseandparseagain("- 1 over 2", "Unary in BinVer as numerator 1");
+ parseandparseagain("{ - 1 } over 2", "Unary in BinVer as numerator 2");
+ parseandparseagain("1 over - 2", "Unary in BinVer as denominator 1");
+ parseandparseagain("1 over { - 2 }", "Unary in BinVer as denominator 2");
+ parseandparseagain("2 { - 1 over 2 }", "Mixed number with Unary in denominator 1");
+ parseandparseagain("2 { - 1 } over 2", "Mixed number with Unary in denominator 2");
+ parseandparseagain("- 1 + 2", "Unary in BinHor");
}
void Test::SimpleBinaryOp()
@@ -227,8 +227,8 @@ void Test::SimpleOperators()
parseandparseagain("prod{a}", "Product");
parseandparseagain("coprod{a}", "Coproduct");
parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
- ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r _ 0 } csub { r _ t } a ", "Upper and lower bounds shown with integral (csub & csup)");
- ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds");
+ ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r _ 0 } csub { r _ t } a", "Upper and lower bounds shown with integral (csub & csup)");
+ ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b", "sum csup { size 8 { x - 1 } } csub { size 8 a } b", "Sum with sized upper and lower bounds");
parseandparseagain("int{a}", "Integral");
parseandparseagain("intd_{1}^{2}{x dx}", "Dynamically-sized integral");
parseandparseagain("iint{a}", "Double integral");
@@ -523,7 +523,7 @@ void Test::testBinomInBinHor()
aCursor.InsertElement(PlusElement);
aCursor.InsertText("d");
- sExpected += " { { binom a b + c } + d } ";
+ sExpected += "{ { binom a b + c } + d }";
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
}
@@ -551,7 +551,7 @@ void Test::testBinVerInUnary()
aCursor.Move(pOutputDevice, MoveDown);
aCursor.InsertText("2");
- sExpected += " - { 1 over 2 } ";
+ sExpected += "- { 1 over 2 }";
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, xDocShRef->GetText());
}
@@ -576,7 +576,7 @@ void Test::testBinHorInSubSup()
aCursor.InsertElement(PlusElement);
aCursor.InsertText("d");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", OUString(" { a ^ { b + c } + d } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", OUString("{ a ^ { b + c } + d }"), xDocShRef->GetText());
}
void Test::testUnaryInMixedNumberAsNumerator()
@@ -615,7 +615,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
aCursor.InsertElement(PlusElement);
aCursor.InsertText("4");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", OUString(" { 2 { - 1 over 2 } + 4 } "), xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", OUString("{ 2 { - 1 over 2 } + 4 }"), xDocShRef->GetText());
}
void Test::testMiscEquivalent()
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index 5ed9bc86f50a..279dbd56e4ad 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -96,66 +96,66 @@ void Test::tearDown()
void Test::testColor()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/color.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("{{color black b}"
- " {color white w}"
- " {color red r}"
- " {color green g}"
- " {color blue b}"
- " {color yellow y}"
- " {color silver s}"
- " {color gray g}"
- " {color maroon m}"
- " {color purple p}"
- " {color lime l}"
- " {color olive o}"
- " {color navy n}"
- " {color teal t}"
- " {color aqua a}"
- " {color fuchsia f}}"),
+ CPPUNIT_ASSERT_EQUAL(OUString("{ color black b"
+ " color white w"
+ " color red r"
+ " color green g"
+ " color blue b"
+ " color yellow y"
+ " color silver s"
+ " color gray g"
+ " color maroon m"
+ " color purple p"
+ " color lime l"
+ " color olive o"
+ " color navy n"
+ " color teal t"
+ " color aqua a"
+ " color fuchsia f }"),
mxDocShell->GetText());
}
void Test::testSimple()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/simple.mml"));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( {a + b} right )^2"), mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), mxDocShell->GetText());
}
void Test::testNsPrefixMath()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml"));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( {a + b} right )^2"), mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), mxDocShell->GetText());
}
void Test::testMaction()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/maction.mml"));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix {1 ## 2 ## 3}"), mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix{ 1 ## 2 ## 3 }"), mxDocShell->GetText());
}
void Test::testMspace()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/mspace.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("{a b ~ c ~~``` d}"), mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("{ a b ~ c ~~``` d }"), mxDocShell->GetText());
}
void Test::testtdf99556()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf99556-1.mml"));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { {} }"), mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { }"), mxDocShell->GetText());
}
void Test::testTdf103430()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103430.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("{{nitalic d}^2 {nitalic {color blue y}}} over {{nitalic d} {font sans {bold {italic {color red x}}}}}"),
+ CPPUNIT_ASSERT_EQUAL(OUString("{ { nitalic d ^ 2 nitalic color blue y } over { nitalic d font sans bold italic color red x } }"),
mxDocShell->GetText());
}
void Test::testTdf103500()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103500.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("{{ int csub a csup b {1 over x ` {nitalic d} x}} = {intd csub a csup b {1 over y ` {nitalic d} y}}}"),
+ CPPUNIT_ASSERT_EQUAL(OUString("{ { int csup b csub a { { 1 over x } ` nitalic d x } } = { intd csup b csub a { { 1 over y } ` nitalic d y } } }"),
mxDocShell->GetText());
}