Remove obsolete suppressOslDebugMessage.
This commit is contained in:
@@ -5098,11 +5098,6 @@ namespace osl_DirectoryItem
|
|||||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_DirectoryItem::getFileStatus, "osl_DirectoryItem" );
|
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_DirectoryItem::getFileStatus, "osl_DirectoryItem" );
|
||||||
}// namespace 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
|
// Beginning of the test cases for Directory class
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
@@ -5582,10 +5577,7 @@ namespace osl_Directory
|
|||||||
void getNextItem_002( )
|
void getNextItem_002( )
|
||||||
{
|
{
|
||||||
::osl::Directory testDirectory( aTmpName3 ); //constructor
|
::osl::Directory testDirectory( aTmpName3 ); //constructor
|
||||||
//deliberate error, suppress run-time warning
|
|
||||||
pfunc_osl_printDetailedDebugMessage pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &suppressOslDebugMessage );
|
|
||||||
nError1 = testDirectory.getNextItem( rItem );
|
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.",
|
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 ) );
|
( ::osl::FileBase::E_INVAL == nError1 ) );
|
||||||
|
@@ -46,11 +46,6 @@ using ::rtl::OUString;
|
|||||||
using ::rtl::OUStringToOString;
|
using ::rtl::OUStringToOString;
|
||||||
using ::rtl::OString;
|
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
|
class test_osl_writeFile : public CppUnit::TestFixture
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -72,11 +67,6 @@ public:
|
|||||||
sErrorMsg += "' would exist!";
|
sErrorMsg += "' would exist!";
|
||||||
CPPUNIT_ASSERT_MESSAGE(sErrorMsg.getStr(), err == FileBase::E_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];
|
char buffer[1];
|
||||||
sal_uInt64 written = 0;
|
sal_uInt64 written = 0;
|
||||||
err = tmp_file.write((void*)buffer, sizeof(buffer), written);
|
err = tmp_file.write((void*)buffer, sizeof(buffer), written);
|
||||||
@@ -88,8 +78,6 @@ public:
|
|||||||
err = tmp_file.close();
|
err = tmp_file.close();
|
||||||
CPPUNIT_ASSERT_MESSAGE("close on unconnected file should fail", err != FileBase::E_None);
|
CPPUNIT_ASSERT_MESSAGE("close on unconnected file should fail", err != FileBase::E_None);
|
||||||
|
|
||||||
osl_setDetailedDebugMessageFunc( pOldDebugMessageFunc );
|
|
||||||
|
|
||||||
err = ::osl::File::remove(aTmpFile);
|
err = ::osl::File::remove(aTmpFile);
|
||||||
CPPUNIT_ASSERT_MESSAGE("temp file should have existed", err == FileBase::E_None);
|
CPPUNIT_ASSERT_MESSAGE("temp file should have existed", err == FileBase::E_None);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user