From 97eb00c75e173d4c8d0b483a7941ad3d2f23783e Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 17:03:35 +1000 Subject: revert OSL_ASSERT changes Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380 --- io/source/acceptor/acc_pipe.cxx | 2 +- io/source/stm/omark.cxx | 4 ++-- io/test/stm/datatest.cxx | 24 ++++++++++++------------ io/test/stm/marktest.cxx | 8 ++++---- io/test/testconnection.cxx | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'io') diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index d01daeadf931..b1395946d936 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -77,7 +77,7 @@ namespace io_acceptor aReadBytes.realloc( nBytesToRead ); } sal_Int32 n = m_pipe.read( aReadBytes.getArray(), nBytesToRead ); - assert( n >= 0 && n <= aReadBytes.getLength() ); + OSL_ASSERT( n >= 0 && n <= aReadBytes.getLength() ); if( n < aReadBytes.getLength() ) { aReadBytes.realloc( n ); diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index e47a4f342e31..9053ada96698 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -497,7 +497,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 ); m_pBuffer->writeAt( m_pBuffer->getSize() , aData ); @@ -506,7 +506,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 44c587895114..283344c271ee 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -181,13 +181,13 @@ sal_Int32 ODataStreamTest::test( rSource.set( 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 ); @@ -727,10 +727,10 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, Reference markableOutput( x , UNO_QUERY ); Reference 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 ); @@ -748,14 +748,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, rSource.set( 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 b8c229dab312..8892e7338330 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -135,8 +135,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 ); @@ -489,8 +489,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 ); diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx index 67310cf854a7..69a2bdeccfb8 100644 --- a/io/test/testconnection.cxx +++ b/io/test/testconnection.cxx @@ -72,11 +72,11 @@ void doRead( const Reference < XConnection > &r ) { Sequence < sal_Int8 > seq(10); - assert( 10 == r->read( seq , 10 ) ); + OSL_ASSERT( 10 == r->read( seq , 10 ) ); for( sal_Int32 i = 0 ; i < 10 ; i ++ ) { - assert( seq.getConstArray()[i] == i ); + OSL_ASSERT( seq.getConstArray()[i] == i ); } } @@ -130,7 +130,7 @@ void testConnection( const OUString &sConnectionDescription , TimeValue value = {1,0}; osl_waitThread( &value ); r = rConnector->connect( sConnectionDescription ); - assert( r.is() ); + OSL_ASSERT( r.is() ); doWrite( r ); doRead( r ); bGotit = sal_True; -- cgit