Remove obsolete suppressOslDebugMessage.

This commit is contained in:
Stephan Bergmann
2012-01-20 12:02:50 +01:00
parent 46ce4f561d
commit d92ac0dfbf
2 changed files with 0 additions and 20 deletions

View File

@@ -5098,11 +5098,6 @@ 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,10 +5577,7 @@ 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 ) );

View File

@@ -46,11 +46,6 @@ using ::rtl::OUString;
using ::rtl::OUStringToOString;
using ::rtl::OString;
//Use to silence OSL_ warnings for a deliberate error
extern "C" void SAL_CALL suppressOslDebugMessage2( const sal_Char *, sal_Int32, const sal_Char * )
{
}
class test_osl_writeFile : public CppUnit::TestFixture
{
public:
@@ -72,11 +67,6 @@ public:
sErrorMsg += "' would exist!";
CPPUNIT_ASSERT_MESSAGE(sErrorMsg.getStr(), err == FileBase::E_EXIST);
//deliberate errors, suppress run-time warning for operations on
//un-opened File
pfunc_osl_printDetailedDebugMessage pOldDebugMessageFunc =
osl_setDetailedDebugMessageFunc( &suppressOslDebugMessage2 );
char buffer[1];
sal_uInt64 written = 0;
err = tmp_file.write((void*)buffer, sizeof(buffer), written);
@@ -88,8 +78,6 @@ public:
err = tmp_file.close();
CPPUNIT_ASSERT_MESSAGE("close on unconnected file should fail", err != FileBase::E_None);
osl_setDetailedDebugMessageFunc( pOldDebugMessageFunc );
err = ::osl::File::remove(aTmpFile);
CPPUNIT_ASSERT_MESSAGE("temp file should have existed", err == FileBase::E_None);
}