summaryrefslogtreecommitdiff
path: root/cppuhelper/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 /cppuhelper/test
parentc0840181bcba5e5e90c44ff56e1780c74fae1683 (diff)
#i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible
Diffstat (limited to 'cppuhelper/test')
-rw-r--r--cppuhelper/test/testidlclass.cxx19
-rw-r--r--cppuhelper/test/testproptyphlp.cxx22
2 files changed, 15 insertions, 26 deletions
diff --git a/cppuhelper/test/testidlclass.cxx b/cppuhelper/test/testidlclass.cxx
index 8784f59d79e3..89b2d6411e77 100644
--- a/cppuhelper/test/testidlclass.cxx
+++ b/cppuhelper/test/testidlclass.cxx
@@ -30,11 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppuhelper.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <cppuhelper/stdidlclass.hxx>
@@ -65,18 +60,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
(XServiceInfo * ) 0
);
- assert( r.is() );
+ OSL_ASSERT( r.is() );
{ // test the xidlclassprovider interface !
Reference< XIdlClassProvider > rProv( r , UNO_QUERY );
- assert( rProv.is() );
+ OSL_ASSERT( rProv.is() );
{
Sequence < Reference < XIdlClass > > seq = rProv->getIdlClasses();
// is always one
- assert( seq.getLength() == 1 );
+ OSL_ASSERT( seq.getLength() == 1 );
// test the weak reference
rProv->getIdlClasses();
@@ -89,7 +84,7 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
}
- assert( r->getName() == sImplName );
+ OSL_ASSERT( r->getName() == sImplName );
// test equals
Reference < XIdlClass > r2 =
@@ -101,18 +96,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
(XServiceInfo * ) 0
);
// test for implementation name
- assert( r2->equals( r ) );
+ OSL_ASSERT( r2->equals( r ) );
Sequence < Reference < XIdlClass > > seqIdlClass = r->getInterfaces();
//TODO !
// one idl class for one interface
// this test fails, if core reflection fails !
-// assert( 1 == seqIdlClass.getLength() );
+// OSL_ASSERT( 1 == seqIdlClass.getLength() );
// Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0];
// check for IdlClass interface returned by Core Reflection
-// assert( rIdlInterface.is() );
+// OSL_ASSERT( rIdlInterface.is() );
diff --git a/cppuhelper/test/testproptyphlp.cxx b/cppuhelper/test/testproptyphlp.cxx
index e798f86cab54..d3b17ed3e83a 100644
--- a/cppuhelper/test/testproptyphlp.cxx
+++ b/cppuhelper/test/testproptyphlp.cxx
@@ -34,12 +34,6 @@
#include <com/sun/star/beans/Property.hpp>
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
-
using namespace ::com::sun::star::uno;
using namespace ::cppu;
@@ -51,27 +45,27 @@ void testPropertyTypeHelper()
sal_Int32 i;
convertPropertyValue( i , a );
- assert( 25 == i );
+ OSL_ASSERT( 25 == i );
sal_Int16 i16;
convertPropertyValue( i16 , a );
- assert( 25 == i16 );
+ OSL_ASSERT( 25 == i16 );
sal_Int8 i8;
convertPropertyValue( i8 , a );
- assert( 25 == i8 );
+ OSL_ASSERT( 25 == i8 );
sal_uInt32 i32;
convertPropertyValue( i32 , a );
- assert( 25 == i32 );
+ OSL_ASSERT( 25 == i32 );
double d;
convertPropertyValue( d , a );
- assert( 25. == d );
+ OSL_ASSERT( 25. == d );
float f;
convertPropertyValue( f , a );
- assert( 25. == f );
+ OSL_ASSERT( 25. == f );
::com::sun::star::beans::Property prop;
@@ -83,11 +77,11 @@ void testPropertyTypeHelper()
::com::sun::star::beans::Property prop2;
convertPropertyValue( prop2 , a );
- assert( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
+ OSL_ASSERT( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
::rtl::OUString ow;
a <<= prop.Name;
convertPropertyValue( ow , a );
- assert( ow == prop.Name );
+ OSL_ASSERT( ow == prop.Name );
}