diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-18 11:53:57 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-18 11:55:37 +0200 |
commit | 60d4b7fe920649812e1b2c59f0b54c9c44df9be1 (patch) | |
tree | 7949068115cac20eb75f9944f3ae74372b188c86 /xmloff/qa/unit | |
parent | f2afe318ce800c1b301f7e1aef769194aa676b12 (diff) |
xmloff tokenmap: do not assume anything did not fail
Change-Id: If13feffe41631b45605511fbad07965e0d5cb8d5
Diffstat (limited to 'xmloff/qa/unit')
-rw-r--r-- | xmloff/qa/unit/tokenmap-test.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmloff/qa/unit/tokenmap-test.cxx b/xmloff/qa/unit/tokenmap-test.cxx index 74a04a0cd2fd..ff482ebe7886 100644 --- a/xmloff/qa/unit/tokenmap-test.cxx +++ b/xmloff/qa/unit/tokenmap-test.cxx @@ -40,10 +40,11 @@ void TokenmapTest::test_roundTrip() { // check that the getIdentifier <-> getToken roundtrip works Sequence< sal_Int8 > rUtf8Name = tokenMap.getUtf8TokenName(nToken); - sal_Int32 ret = token::TokenMap::getTokenFromUTF8( - reinterpret_cast< const char * >(rUtf8Name.getConstArray()), - rUtf8Name.getLength() ); - CPPUNIT_ASSERT_EQUAL(ret, 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); + sal_Int32 ret = token::TokenMap::getTokenFromUTF8( pChar, rUtf8Name.getLength() ); + CPPUNIT_ASSERT_EQUAL_MESSAGE("No roundtrip for token", ret, nToken); } } |