[Libreoffice-commits] .: starmath/CppunitTest_starmath_qa_cppunit.mk starmath/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 23:11:32 PDT 2012


 starmath/CppunitTest_starmath_qa_cppunit.mk     |    3 +++
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |   18 +++++++++---------
 starmath/qa/cppunit/test_starmath.cxx           |    2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 0772bfc17afc84149e2ff454246182b3d9309e53
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date:   Thu Oct 25 10:06:24 2012 +0400

    fix compilation and linking of starmath cppunit tests
    
    ... but the tests still crash and are disabled.
    
    Change-Id: I5df66f21865cac98c38d4ef3684c562784e093b9

diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk
index efde9b4..90d3799 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 b7e363c..c98afae 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 bbea57b..a7490ef 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();
 


More information about the Libreoffice-commits mailing list