[Libreoffice-commits] core.git: xmloff/qa

Eike Rathke erack at redhat.com
Thu Aug 18 11:58:52 UTC 2016


 xmloff/qa/unit/tokenmap-test.cxx |   26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 5dd8fdae4ad005481068852925aa5e4191c3a6bc
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Aug 18 13:55:30 2016 +0200

    xmloff tokenmap: allocate map on heap instead of as class member
    
    Try to make the tinderbox happy..
    
    Change-Id: I564d554739fc38d2a901d38ad676c9ba28f3c233

diff --git a/xmloff/qa/unit/tokenmap-test.cxx b/xmloff/qa/unit/tokenmap-test.cxx
index ff482eb..6fef38c 100644
--- a/xmloff/qa/unit/tokenmap-test.cxx
+++ b/xmloff/qa/unit/tokenmap-test.cxx
@@ -23,6 +23,12 @@ namespace xmloff {
 class TokenmapTest: public CppUnit::TestFixture
 {
 public:
+
+    TokenmapTest();
+
+    virtual void setUp() override;
+    virtual void tearDown() override;
+
     void test_roundTrip();
 
     CPPUNIT_TEST_SUITE(TokenmapTest);
@@ -31,15 +37,31 @@ public:
     CPPUNIT_TEST_SUITE_END();
 
 private:
-    token::TokenMap tokenMap;
+    token::TokenMap* pTokenMap;
 };
 
+TokenmapTest::TokenmapTest() : pTokenMap(nullptr)
+{
+}
+
+void TokenmapTest::setUp()
+{
+    CppUnit::TestFixture::setUp();
+    pTokenMap = new token::TokenMap;
+}
+
+void TokenmapTest::tearDown()
+{
+    delete pTokenMap;
+    CppUnit::TestFixture::tearDown();
+}
+
 void TokenmapTest::test_roundTrip()
 {
     for ( sal_Int32 nToken = 0; nToken < XML_TOKEN_COUNT; ++nToken )
     {
         // check that the getIdentifier <-> getToken roundtrip works
-        Sequence< sal_Int8 > rUtf8Name = tokenMap.getUtf8TokenName(nToken);
+        Sequence< sal_Int8 > rUtf8Name = pTokenMap->getUtf8TokenName(nToken);
         CPPUNIT_ASSERT_MESSAGE("Token name sequence should not be empty", rUtf8Name.getLength());
         const char* pChar = reinterpret_cast< const char * >(rUtf8Name.getConstArray());
         CPPUNIT_ASSERT_MESSAGE("Token name sequence array pointer failed", pChar);


More information about the Libreoffice-commits mailing list