diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-07-10 14:03:42 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-07-10 14:03:42 +0200 |
commit | ffd6952e9ad711c6eb60d2eb823999ff99fa0f05 (patch) | |
tree | c4b0f9158808524ddc6db21b8aed2c54460da705 /io | |
parent | c0840181bcba5e5e90c44ff56e1780c74fae1683 (diff) |
#i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible
Diffstat (limited to 'io')
-rw-r--r-- | io/source/stm/omark.cxx | 10 | ||||
-rw-r--r-- | io/test/stm/datatest.cxx | 28 | ||||
-rw-r--r-- | io/test/stm/marktest.cxx | 14 |
3 files changed, 18 insertions, 34 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index 69ccf08fce6a..29d326170ff1 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -49,12 +49,6 @@ #include <osl/mutex.hxx> #include <rtl/ustrbuf.hxx> -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include <assert.h> #include <string.h> @@ -632,7 +626,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 sal_Int32 nToRead = nBytesToRead - ( m_pBuffer->getSize() - m_nCurrentPos ); nRead = m_input->readBytes( aData , nToRead ); - assert( aData.getLength() == nRead ); + OSL_ASSERT( aData.getLength() == nRead ); try { @@ -650,7 +644,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 } } - assert( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead ); + OSL_ASSERT( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead ); m_pBuffer->readAt( m_nCurrentPos , aData , nBytesToRead ); diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index 3de10d5fe63e..b7515b3c5417 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -55,10 +55,6 @@ #include <osl/conditn.hxx> #include <osl/mutex.hxx> -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include <assert.h> #include <string.h> using namespace ::rtl; @@ -209,13 +205,13 @@ sal_Int32 ODataStreamTest::test( rSource = Reference< XActiveDataSource > ( x, UNO_QUERY ); } - assert( rPipeInput.is() ); - assert( rPipeOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); rSink->setInputStream( rPipeInput ); rSource->setOutputStream( rPipeOutput ); - assert( rSink->getInputStream().is() ); - assert( rSource->getOutputStream().is() ); + OSL_ASSERT( rSink->getInputStream().is() ); + OSL_ASSERT( rSource->getOutputStream().is() ); if( 1 == hTestHandle ) { testSimple( rInput , rOutput ); @@ -778,10 +774,10 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, Reference <XOutputStream > markableOutput( x , UNO_QUERY ); Reference <XActiveDataSource > markableSource( x , UNO_QUERY ); - assert( markableInput.is() ); - assert( markableOutput.is() ); - assert( markableSink.is() ); - assert( markableSource.is() ); + OSL_ASSERT( markableInput.is() ); + OSL_ASSERT( markableOutput.is() ); + OSL_ASSERT( markableSink.is() ); + OSL_ASSERT( markableSource.is() ); markableSink->setInputStream( rPipeInput ); markableSource->setOutputStream( rPipeOutput ); @@ -799,14 +795,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, rSource = Reference <XActiveDataSource>( x, UNO_QUERY ); } - assert( rPipeInput.is() ); - assert( rPipeOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); rSink->setInputStream( markableInput ); rSource->setOutputStream( markableOutput ); - assert( rSink->getInputStream().is() ); - assert( rSource->getOutputStream().is() ); + OSL_ASSERT( rSink->getInputStream().is() ); + OSL_ASSERT( rSource->getOutputStream().is() ); if( 1 + DATASTREAM_TEST_MAX_HANDLE == hTestHandle ) { testObject( rOutput , rInput); diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx index 88d52a09c891..20e4015ffa1f 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -46,12 +46,6 @@ #include <osl/conditn.hxx> #include <osl/mutex.hxx> -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include <assert.h> -#include <string.h> - using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -159,8 +153,8 @@ sal_Int32 OMarkableOutputStreamTest::test( Reference< XOutputStream > rOutput( TestObject , UNO_QUERY ); - assert( rPipeInput.is() ); - assert( rOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rOutput.is() ); if( 1 == hTestHandle ) { // checks usual streaming testSimple( rOutput , rPipeInput ); @@ -526,8 +520,8 @@ sal_Int32 OMarkableInputStreamTest::test( Reference < XInputStream > rInput( TestObject , UNO_QUERY ); - assert( rPipeOutput.is() ); - assert( rInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); + OSL_ASSERT( rInput.is() ); if( 1 == hTestHandle ) { // checks usual streaming testSimple( rPipeOutput , rInput ); |