From ffd6952e9ad711c6eb60d2eb823999ff99fa0f05 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 10 Jul 2009 14:03:42 +0200 Subject: #i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible --- bridges/test/testclient.cxx | 15 +++++---------- bridges/test/testcomp.cxx | 11 +++-------- bridges/test/testoffice.cxx | 10 +++------- bridges/test/testsameprocess.cxx | 7 +------ 4 files changed, 12 insertions(+), 31 deletions(-) (limited to 'bridges/test') diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx index df5ac58d1a2d..ce870bc19ea9 100644 --- a/bridges/test/testclient.cxx +++ b/bridges/test/testclient.cxx @@ -32,11 +32,6 @@ #include "precompiled_bridges.hxx" #include -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include @@ -193,10 +188,10 @@ int main( int argc, char *argv[] ) { // test the factory Reference < XBridge > rBridge2 = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); - assert( rBridge2.is() ); - assert( rBridge2->getDescription() == rBridge->getDescription( ) ); - assert( rBridge2->getName() == rBridge->getName() ); - assert( rBridge2 == rBridge ); + OSL_ASSERT( rBridge2.is() ); + OSL_ASSERT( rBridge2->getDescription() == rBridge->getDescription( ) ); + OSL_ASSERT( rBridge2->getName() == rBridge->getName() ); + OSL_ASSERT( rBridge2 == rBridge ); } @@ -230,7 +225,7 @@ int main( int argc, char *argv[] ) } Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); -// assert( ! rBridge.is() ); +// OSL_ASSERT( ! rBridge.is() ); } } diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx index 432a32f2a554..90a07ab31f43 100644 --- a/bridges/test/testcomp.cxx +++ b/bridges/test/testcomp.cxx @@ -30,11 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include #include @@ -598,7 +593,7 @@ void testException( const Reference < XCallMe > &r ) { try { r->call( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy")) , -1 ); - assert( ! "no exception flown !" ); + OSL_ASSERT( ! "no exception flown !" ); } catch( TestBridgeException & e ) { @@ -606,11 +601,11 @@ void testException( const Reference < XCallMe > &r ) } catch( Exception & e ) { - assert( ! "only base class of exception could be catched!" ); + OSL_ASSERT( ! "only base class of exception could be catched!" ); } catch(...) { - assert(! "wrong unknown exception !" ); + OSL_ASSERT(! "wrong unknown exception !" ); } } diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx index bae00be6caaa..bf5b470d7185 100644 --- a/bridges/test/testoffice.cxx +++ b/bridges/test/testoffice.cxx @@ -30,10 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include #include #include @@ -96,7 +92,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr ) rSmgr->createInstance( OUString::createFromAscii( "com.sun.star.io.Pipe" ) ), UNO_QUERY ); - assert( rOut.is() ); + OSL_ASSERT( rOut.is() ); { Sequence < sal_Int8 > seq( 10 ); @@ -115,7 +111,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr ) if( ! ( 42 == seq.getArray()[0] ) ) printf( "wrong element in sequence\n" ); -// assert( 0 ); +// OSL_ASSERT( 0 ); } } #include @@ -155,7 +151,7 @@ void testDocument( const Reference < XMultiServiceFactory > & rSmgr ) rSmgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ))), UNO_QUERY ); - assert( rLoader.is() ); + OSL_ASSERT( rLoader.is() ); sal_Char *urls[] = { "private:factory/swriter", diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx index cf67d2484cb3..1cfc44078376 100644 --- a/bridges/test/testsameprocess.cxx +++ b/bridges/test/testsameprocess.cxx @@ -30,11 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include @@ -201,7 +196,7 @@ int main( int argc, char *argv[] ) Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); - assert( ! rBridge.is() ); + OSL_ASSERT( ! rBridge.is() ); } catch( Exception & ) -- cgit