summaryrefslogtreecommitdiff
path: root/bridges/test
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-07-10 14:03:42 +0200
committerMathias Bauer <mba@openoffice.org>2009-07-10 14:03:42 +0200
commitffd6952e9ad711c6eb60d2eb823999ff99fa0f05 (patch)
treec4b0f9158808524ddc6db21b8aed2c54460da705 /bridges/test
parentc0840181bcba5e5e90c44ff56e1780c74fae1683 (diff)
#i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible
Diffstat (limited to 'bridges/test')
-rw-r--r--bridges/test/testclient.cxx15
-rw-r--r--bridges/test/testcomp.cxx11
-rw-r--r--bridges/test/testoffice.cxx10
-rw-r--r--bridges/test/testsameprocess.cxx7
4 files changed, 12 insertions, 31 deletions
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 <string.h>
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -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 <assert.h>
#include <string.h>
#include <stdlib.h>
#include <osl/time.h>
@@ -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 <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -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<stdio.h>
@@ -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 <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -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 & )