summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2014-09-20 16:57:13 +0200
committerDavid Ostrovsky <David.Ostrovsky@gmx.de>2014-09-23 06:08:01 +0000
commitb529efc45962cd451198df273f41fc69f16ac1a6 (patch)
tree7c1052f56eabed8ce7f9498cc13a64a2b7fd7e2a /oox/source
parentc5464f127d4d4707a5f92281c480266fd3f1b361 (diff)
Add unit test for oox::TokenMap
Change-Id: Iced083868a84fd9fbb97ad91dfc0acbf5b69b766 Reviewed-on: https://gerrit.libreoffice.org/11559 Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/token/tokenmap.cxx14
1 files changed, 0 insertions, 14 deletions
diff --git a/oox/source/token/tokenmap.cxx b/oox/source/token/tokenmap.cxx
index 2989a343be92..327dab0c9af6 100644
--- a/oox/source/token/tokenmap.cxx
+++ b/oox/source/token/tokenmap.cxx
@@ -62,20 +62,6 @@ TokenMap::TokenMap() :
aIt->maUtf8Name = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aUtf8Token.getStr() ), aUtf8Token.getLength() );
}
-#if OSL_DEBUG_LEVEL > 0
- // check that the perfect_hash is in sync with the token name list
- bool bOk = true;
- for( sal_Int32 nToken = 0; bOk && (nToken < XML_TOKEN_COUNT); ++nToken )
- {
- // check that the getIdentifier <-> getToken roundtrip works
- OString aUtf8Name = OUStringToOString( maTokenNames[ nToken ].maUniName, RTL_TEXTENCODING_UTF8 );
- const struct xmltoken* pToken = Perfect_Hash::in_word_set( aUtf8Name.getStr(), aUtf8Name.getLength() );
- bOk = pToken && (pToken->nToken == nToken);
- OSL_ENSURE( bOk, OStringBuffer( "TokenMap::TokenMap - token list broken, #" ).
- append( nToken ).append( ", '" ).append( aUtf8Name ).append( '\'' ).getStr() );
- }
-#endif
-
for (unsigned char c = 'a'; c <= 'z'; c++)
{
const struct xmltoken* pToken = Perfect_Hash::in_word_set(