diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-16 21:41:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-16 21:41:14 +0000 |
commit | 270c3ecf0ab512332cf5ae747f5dfc2c8d5a8c2b (patch) | |
tree | e50a83d978c8818e058673888d7e9fd07462f26b /sal/qa/osl/file | |
parent | e32eea1336e1a4af5c44e9019064e2aba4b2a298 (diff) |
Suppress OSL_ASSERT about the deliberate error in the cppunit test.
We want to test for this, retain the OSL_ASSERT for the normal case, and not
get noise during the test itself.
Diffstat (limited to 'sal/qa/osl/file')
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 39166784d..d87342524 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -5102,6 +5102,10 @@ namespace osl_DirectoryItem CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_DirectoryItem::getFileStatus, "osl_DirectoryItem" ); }// namespace osl_DirectoryItem +//Use to deliberately silence warnings for a deliberate error +extern "C" void SAL_CALL suppressOslDebugMessage( const sal_Char *, sal_Int32, const sal_Char * ) +{ +} //------------------------------------------------------------------------ // Beginning of the test cases for Directory class @@ -5582,7 +5586,10 @@ namespace osl_Directory void getNextItem_002( ) { ::osl::Directory testDirectory( aTmpName3 ); //constructor + //deliberate error, suppress run-time warning + pfunc_osl_printDetailedDebugMessage pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &suppressOslDebugMessage ); nError1 = testDirectory.getNextItem( rItem ); + osl_setDetailedDebugMessageFunc( pOldDebugMessageFunc ); CPPUNIT_ASSERT_MESSAGE( "test for getNextItem function: retrive an item in a directory which is not opened, also test for nHint's default value.", ( ::osl::FileBase::E_INVAL == nError1 ) ); |