summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-10-25 10:06:24 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-10-25 10:10:35 +0400
commit0772bfc17afc84149e2ff454246182b3d9309e53 (patch)
treec1465f95f27b7c903747fd45926bf82dffd7777d /starmath
parent3113389d438a0e897e48a445f0443183331a3482 (diff)
fix compilation and linking of starmath cppunit tests
... but the tests still crash and are disabled. Change-Id: I5df66f21865cac98c38d4ef3684c562784e093b9
Diffstat (limited to 'starmath')
-rw-r--r--starmath/CppunitTest_starmath_qa_cppunit.mk3
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx18
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx2
3 files changed, 13 insertions, 10 deletions
diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk
index efde9b438482..90d379933aa2 100644
--- a/starmath/CppunitTest_starmath_qa_cppunit.mk
+++ b/starmath/CppunitTest_starmath_qa_cppunit.mk
@@ -48,7 +48,10 @@ $(eval $(call gb_CppunitTest_use_libraries,starmath_qa_cppunit,\
editeng \
i18nisolang1 \
i18nutil \
+ msfilter \
+ oox \
sal \
+ sax \
sfx \
sot \
svl \
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index b7e363ca4818..c98afaeb9da5 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -557,7 +557,7 @@ void Test::testBinomInBinHor()
// tack +d on the end, which will put the binom into an SmBinHorNode
aCursor.InsertElement(PlusElement);
- aCursor.InsertText('d');
+ aCursor.InsertText("d");
sExpected.AppendAscii(" { { binom a b + c } + d } ");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
@@ -588,7 +588,7 @@ void Test::testBinVerInUnary()
// set up a fraction
aCursor.InsertFraction();
aCursor.Move(&aOutputDevice, MoveDown);
- aCursor.InsertText('2');
+ aCursor.InsertText("2");
sExpected.AppendAscii(" - { 1 over 2 } ");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, xDocShRef->GetText());
@@ -610,16 +610,16 @@ void Test::testBinHorInSubSup()
TestOutputDevice aOutputDevice;
// Insert an RSup expression with a BinHor for the exponent
- aCursor.InsertText('a');
+ aCursor.InsertText("a");
aCursor.InsertSubSup(RSUP);
- aCursor.InsertText('b');
+ aCursor.InsertText("b");
aCursor.InsertElement(PlusElement);
- aCursor.InsertText('c');
+ aCursor.InsertText("c");
// Move to the end and add d to the expression
aCursor.Move(&aOutputDevice, MoveRight);
aCursor.InsertElement(PlusElement);
- aCursor.InsertText('d');
+ aCursor.InsertText("d");
sExpected.AppendAscii(" { a rsup { b + c } + d } ");
CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", sExpected, xDocShRef->GetText());
@@ -652,13 +652,13 @@ void Test::testUnaryInMixedNumberAsNumerator()
// Set up a fraction
aCursor.InsertFraction();
aCursor.Move(&aOutputDevice, MoveDown);
- aCursor.InsertText('2');
+ aCursor.InsertText("2");
// Move left and turn this into a mixed number
// (bad form, but this could happen right?)
aCursor.Move(&aOutputDevice, MoveLeft);
aCursor.Move(&aOutputDevice, MoveLeft);
- aCursor.InsertText('2');
+ aCursor.InsertText("2");
// move forward (more than) enough places to be at the end
for (i = 0; i < 8; ++i)
@@ -666,7 +666,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
// add 4 to the end
aCursor.InsertElement(PlusElement);
- aCursor.InsertText('4');
+ aCursor.InsertText("4");
sExpected.AppendAscii(" { 2 { - 1 over 2 } + 4 } ");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", sExpected, xDocShRef->GetText());
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index bbea57bb0f26..a7490ef3b4ff 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -240,7 +240,7 @@ void Test::tmEditAllClipboard()
void Test::tmEditFailure()
{
- m_xDocShRef->SetText("color a b over {a/}");
+ m_xDocShRef->SetText(String("color a b over {a/}"));
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser().NextError();