[Libreoffice-commits] .: sal/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Feb 16 13:46:35 PST 2011
sal/qa/osl/file/test_cpy_wrt_file.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 967ff0b9d6d636f95221dbd2d060537ce9aa772c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 16 21:45:52 2011 +0000
Silence ASSERT for the test of a deliberate error.
push and pop assert handler for this deliberate error.
diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx
index 28402ec..f982320 100644
--- a/sal/qa/osl/file/test_cpy_wrt_file.cxx
+++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx
@@ -75,6 +75,11 @@ public:
# define WRITE_DEST_PATH "d:\\tmp_data.tmp"
#endif
+//Use to deliberately silence warnings for a deliberate error
+extern "C" void SAL_CALL suppressOslDebugMessage( const sal_Char *, sal_Int32, const sal_Char * )
+{
+}
+
class test_osl_writeFile : public CppUnit::TestFixture
{
public:
@@ -94,7 +99,10 @@ public:
sal_uInt64 written = 0;
err = tmp_file.write((void*)buffer, sizeof(buffer), written);
+ //deliberate error, suppress run-time warning
+ pfunc_osl_printDetailedDebugMessage pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &suppressOslDebugMessage );
err = tmp_file.sync();
+ osl_setDetailedDebugMessageFunc( pOldDebugMessageFunc );
CPPUNIT_ASSERT_MESSAGE("Write didn't recognized disk full", err != FileBase::E_None);
More information about the Libreoffice-commits
mailing list