diff options
author | sb <sb@openoffice.org> | 2010-01-13 22:32:57 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-01-13 22:32:57 +0100 |
commit | 7969604293077e7416f758537eb9b9778265b1c7 (patch) | |
tree | 576f0de50c73c33994dc119fc4f463542e9d87f0 /sal | |
parent | ae12b3fe73ca48286a06414c41e35ef75dd2d082 (diff) |
sb118: adapted some more sal unit tests to new CppUnit framework; fixes for unxmacxi
Diffstat (limited to 'sal')
-rw-r--r-- | sal/prj/build.lst | 3 | ||||
-rw-r--r-- | sal/qa/ByteSequence/makefile.mk | 6 | ||||
-rw-r--r-- | sal/qa/OStringBuffer/makefile.mk | 4 | ||||
-rw-r--r-- | sal/qa/OStringBuffer/rtl_String_Utils.cxx | 2 | ||||
-rwxr-xr-x | sal/qa/osl/mutex/makefile.mk | 13 | ||||
-rwxr-xr-x | sal/qa/osl/mutex/osl_Mutex.cxx | 34 | ||||
-rwxr-xr-x | sal/qa/osl/mutex/osl_Mutex_Const.h | 4 | ||||
-rw-r--r-- | sal/qa/osl/pipe/export.exp | 1 | ||||
-rw-r--r-- | sal/qa/osl/pipe/makefile.mk | 10 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.cxx | 112 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.xsce | 9 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe_Const.h | 1 | ||||
-rw-r--r-- | sal/qa/osl/profile/makefile.mk | 10 | ||||
-rw-r--r-- | sal/qa/osl/profile/osl_old_testprofile.cxx | 13 |
14 files changed, 116 insertions, 106 deletions
diff --git a/sal/prj/build.lst b/sal/prj/build.lst index 134c9ac1ec08..838384f76152 100644 --- a/sal/prj/build.lst +++ b/sal/prj/build.lst @@ -17,3 +17,6 @@ sa sal\util nmake - all sa_util sa_tc.u sa_oslall sa_uwinapi.n sa_kill.n sa sal\cppunittester nmake - all sa_cppunittester sa_cpprt.u sa_util NULL sa sal\qa\ByteSequence nmake - all sa_qa_ByteSequence sa_cppunittester sa_util NULL sa sal\qa\OStringBuffer nmake - all sa_qa_OStringBuffer sa_cppunittester sa_util NULL +sa sal\qa\osl\mutex nmake - all sa_qa_osl_mutex sa_cppunittester sa_util NULL +sa sal\qa\osl\pipe nmake - all sa_qa_osl_pipe sa_cppunittester sa_util NULL +sa sal\qa\osl\profile nmake - all sa_qa_osl_profile sa_cppunittester sa_util NULL diff --git a/sal/qa/ByteSequence/makefile.mk b/sal/qa/ByteSequence/makefile.mk index a198d7987da7..d3009cc4d451 100644 --- a/sal/qa/ByteSequence/makefile.mk +++ b/sal/qa/ByteSequence/makefile.mk @@ -55,24 +55,26 @@ SHL1OBJS= \ $(SLO)$/ByteSequence.obj SHL1TARGET= rtl_ByteSequence -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = $(PRJ)$/qa$/export.map +SHL1RPATH = NONE # --- BEGIN -------------------------------------------------------- SHL2OBJS= \ $(SLO)$/rtl_old_testbyteseq.obj SHL2TARGET= rtl_old_testbyteseq -SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME =$(SHL2TARGET) SHL2VERSIONMAP = $(PRJ)$/qa$/export.map +SHL2RPATH = NONE # END -------------------------------------------------------------- #------------------------------- All object files ------------------------------- diff --git a/sal/qa/OStringBuffer/makefile.mk b/sal/qa/OStringBuffer/makefile.mk index 873de5008767..2cabed7dedd3 100644 --- a/sal/qa/OStringBuffer/makefile.mk +++ b/sal/qa/OStringBuffer/makefile.mk @@ -61,14 +61,14 @@ SHL1OBJS= \ $(SLO)$/rtl_String_Utils.obj SHL1TARGET= rtl_OStringBuffer -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = $(PRJ)$/qa$/export.map - +SHL1RPATH = NONE #------------------------------- All object files ------------------------------- # do this here, so we get right dependencies diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx index a8698ff1bbc8..83399bb6f481 100644 --- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx +++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx @@ -91,7 +91,7 @@ sal_Char* cpystr( sal_Char* dst, const sal_Char* src ) const sal_Char* psrc = src; sal_Char* pdst = dst; - while( *pdst++ = *psrc++ ); + while( (*pdst++ = *psrc++) ); return ( dst ); } diff --git a/sal/qa/osl/mutex/makefile.mk b/sal/qa/osl/mutex/makefile.mk index 7c8cfeb39037..7fdc72ff8b45 100755 --- a/sal/qa/osl/mutex/makefile.mk +++ b/sal/qa/osl/mutex/makefile.mk @@ -29,6 +29,10 @@ # #************************************************************************* +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + PRJ=..$/..$/.. PRJNAME=sal @@ -49,19 +53,16 @@ SHL1OBJS= \ $(SLO)$/osl_Mutex.obj SHL1TARGET= osl_Mutex -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) .IF "$(GUI)" == "WNT" SHL1STDLIBS += $(WS2_32LIB) .ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS += -ldl -lnsl -.ENDIF - SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = $(PRJ)$/qa$/export.map +SHL1RPATH = NONE # auto generated Target:Socket # END ------------------------------------------------------------------ @@ -70,3 +71,5 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map .INCLUDE : target.mk .INCLUDE : _cppunit.mk + +.END diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index a615bb3ce0dc..3d01a5892fe8 100755 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -34,6 +34,10 @@ //------------------------------------------------------------------------ // include files //------------------------------------------------------------------------ +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include <osl_Mutex_Const.h> using namespace osl; @@ -49,17 +53,17 @@ inline void printUString( const ::rtl::OUString & str ) { rtl::OString aString; - t_print("#printUString_u# " ); + printf("#printUString_u# " ); aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US ); - t_print("%s\n", aString.getStr( ) ); + printf("%s\n", aString.getStr( ) ); } /** print Boolean value. */ inline void printBool( sal_Bool bOk ) { - t_print("#printBool# " ); - ( sal_True == bOk ) ? t_print("YES!\n" ): t_print("NO!\n" ); + printf("#printBool# " ); + ( sal_True == bOk ) ? printf("YES!\n" ): printf("NO!\n" ); } /** pause nSec seconds helper function. @@ -78,7 +82,7 @@ namespace ThreadHelper #if ( defined UNX ) || ( defined OS2 ) //Unix sleep( _nSec ); #endif - // t_print("# done\n" ); + // printf("# done\n" ); } void thread_sleep_tenth_sec(sal_Int32 _nTenthSec) { @@ -230,7 +234,7 @@ protected: { // block here if the mutex has been acquired pMyMutex->acquire( ); - t_print("# Mutex acquired. \n" ); + printf("# Mutex acquired. \n" ); pMyMutex->release( ); } }; @@ -276,7 +280,7 @@ protected: Mutex* pGlobalMutex; pGlobalMutex = pGlobalMutex->getGlobalMutex( ); pGlobalMutex->acquire( ); - t_print("# Global Mutex acquired. \n" ); + printf("# Global Mutex acquired. \n" ); pGlobalMutex->release( ); } }; @@ -341,7 +345,7 @@ namespace osl_Mutex bRes = sal_True; /*for (sal_Int8 i=0; i<BUFFER_SIZE; i++) - t_print("#data in buffer is %d\n", m_Data.buffer[i]); + printf("#data in buffer is %d\n", m_Data.buffer[i]); */ CPPUNIT_ASSERT_MESSAGE("Mutex ctor", bRes == sal_True); @@ -695,7 +699,7 @@ protected: void SAL_CALL run( ) { // acquire the mutex - // t_print("# ClearGuardThread" ); + // printf("# ClearGuardThread" ); ClearableMutexGuard aGuard( pMyMutex ); ThreadHelper::thread_sleep( 5 ); @@ -771,7 +775,7 @@ namespace osl_ClearableGuard TimeValue aTimeVal_after; osl_getSystemTime( &aTimeVal_after ); sal_Int32 nSec = aTimeVal_after.Seconds - aTimeVal_befor.Seconds; - t_print("nSec is %d\n", nSec); + printf("nSec is %"SAL_PRIdINT32"\n", nSec); myThread.join(); @@ -837,7 +841,7 @@ protected: void SAL_CALL run( ) { // acquire the mutex - t_print("# ResettableGuard" ); + printf("# ResettableGuard" ); ResettableMutexGuard aGuard( pMyMutex ); // release the mutex aGuard.clear( ); @@ -936,13 +940,11 @@ namespace osl_ResettableGuard }; // class reset // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_ResettableGuard::ctor, "osl_ResettableGuard"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_ResettableGuard::reset, "osl_ResettableGuard"); +CPPUNIT_TEST_SUITE_REGISTRATION(osl_ResettableGuard::ctor); +CPPUNIT_TEST_SUITE_REGISTRATION(osl_ResettableGuard::reset); } // namespace osl_ResettableGuard -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); // The following sets variables for GNU EMACS // Local Variables: diff --git a/sal/qa/osl/mutex/osl_Mutex_Const.h b/sal/qa/osl/mutex/osl_Mutex_Const.h index a13f40ab9605..336cd0aa649e 100755 --- a/sal/qa/osl/mutex/osl_Mutex_Const.h +++ b/sal/qa/osl/mutex/osl_Mutex_Const.h @@ -1,5 +1,5 @@ /************************************************************************* -* + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. @@ -49,8 +49,6 @@ #endif #include <osl/time.h> -#include <testshl/simpleheader.hxx> - #ifdef UNX #include <unistd.h> #endif diff --git a/sal/qa/osl/pipe/export.exp b/sal/qa/osl/pipe/export.exp deleted file mode 100644 index a13529da5876..000000000000 --- a/sal/qa/osl/pipe/export.exp +++ /dev/null @@ -1 +0,0 @@ -registerAllTestFunction diff --git a/sal/qa/osl/pipe/makefile.mk b/sal/qa/osl/pipe/makefile.mk index 3d0df14bbd69..194c602c4785 100644 --- a/sal/qa/osl/pipe/makefile.mk +++ b/sal/qa/osl/pipe/makefile.mk @@ -29,6 +29,10 @@ # #************************************************************************* +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + PRJ=..$/..$/.. PRJNAME=sal @@ -49,14 +53,14 @@ SHL1OBJS= \ $(SLO)$/osl_Pipe.obj SHL1TARGET= osl_Pipe -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = $(PRJ)$/qa$/export.map -# DEF1EXPORTFILE= export.exp +SHL1RPATH = NONE # auto generated Target:Pipe # END ------------------------------------------------------------------ @@ -64,3 +68,5 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map .INCLUDE : target.mk .INCLUDE : _cppunit.mk + +.END diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index c2b2ae740527..f82d6a4ce0e2 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -35,7 +35,10 @@ // include files //------------------------------------------------------------------------ -#include <testshl/simpleheader.hxx> +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include <sal/types.h> #include <rtl/ustring.hxx> @@ -67,8 +70,8 @@ using namespace rtl; */ inline void printBool( sal_Bool bOk ) { - t_print("#printBool# " ); - ( sal_True == bOk ) ? t_print("YES!\n" ): t_print("NO!\n" ); + printf("#printBool# " ); + ( sal_True == bOk ) ? printf("YES!\n" ): printf("NO!\n" ); } /** print a UNI_CODE String. @@ -77,9 +80,9 @@ inline void printUString( const ::rtl::OUString & str ) { rtl::OString aString; - t_print("#printUString_u# " ); + printf("#printUString_u# " ); aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US ); - t_print("%s\n", aString.getStr( ) ); + printf("%s\n", aString.getStr( ) ); } /** print last error of pipe system. @@ -87,43 +90,43 @@ inline void printUString( const ::rtl::OUString & str ) inline void printPipeError( ::osl::Pipe aPipe ) { oslPipeError nError = aPipe.getError( ); - t_print("#printPipeError# " ); + printf("#printPipeError# " ); switch ( nError ) { case osl_Pipe_E_None: - t_print("Success!\n" ); + printf("Success!\n" ); break; case osl_Pipe_E_NotFound: - t_print("The returned error is: Not found!\n" ); + printf("The returned error is: Not found!\n" ); break; case osl_Pipe_E_AlreadyExists: - t_print("The returned error is: Already exist!\n" ); + printf("The returned error is: Already exist!\n" ); break; case osl_Pipe_E_NoProtocol: - t_print("The returned error is: No protocol!\n" ); + printf("The returned error is: No protocol!\n" ); break; case osl_Pipe_E_NetworkReset: - t_print("The returned error is: Network reset!\n" ); + printf("The returned error is: Network reset!\n" ); break; case osl_Pipe_E_ConnectionAbort: - t_print("The returned error is: Connection aborted!\n" ); + printf("The returned error is: Connection aborted!\n" ); break; case osl_Pipe_E_ConnectionReset: - t_print("The returned error is: Connection reset!\n" ); + printf("The returned error is: Connection reset!\n" ); break; case osl_Pipe_E_NoBufferSpace: - t_print("The returned error is: No buffer space!\n" ); + printf("The returned error is: No buffer space!\n" ); break; case osl_Pipe_E_TimedOut: - t_print("The returned error is: Timeout!\n" ); + printf("The returned error is: Timeout!\n" ); break; case osl_Pipe_E_ConnectionRefused: - t_print("The returned error is: Connection refused!\n" ); + printf("The returned error is: Connection refused!\n" ); break; case osl_Pipe_E_invalidError: - t_print("The returned error is: Invalid error!\n" ); + printf("The returned error is: Invalid error!\n" ); break; default: - t_print("The returned error is: Number %d, Unknown Error\n", nError ); + printf("The returned error is: Number %d, Unknown Error\n", nError ); break; } } @@ -690,17 +693,17 @@ namespace osl_Pipe // ----------------------------------------------------------------------------- - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::ctors, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::is, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::create, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::clear, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::assign, "osl_Pipe"); -//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::isValid, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::isEqual, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::close, "osl_Pipe"); - //CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::accept, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::getError, "osl_Pipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::getHandle, "osl_Pipe"); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::ctors); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::is); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::create); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::clear); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::assign); +//CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::isValid); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::isEqual); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::close); + //CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::accept); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::getError); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::getHandle); // ----------------------------------------------------------------------------- } // namespace osl_Pipe @@ -884,7 +887,7 @@ namespace osl_StreamPipe void thread_sleep( sal_Int32 _nSec ) { /// print statement in thread process must use fflush() to force display. - // t_print("wait %d seconds. ", _nSec ); + // printf("wait %d seconds. ", _nSec ); fflush(stdout); #ifdef WNT //Windows @@ -893,7 +896,7 @@ namespace osl_StreamPipe #if ( defined UNX ) || ( defined OS2 ) //Unix sleep( _nSec ); #endif - // t_print("done\n" ); + // printf("done\n" ); } // test read/write & send/recv data to pipe // ----------------------------------------------------------------------------- @@ -912,27 +915,27 @@ namespace osl_StreamPipe { sal_Int32 nChars = 0; - t_print("open pipe\n"); + printf("open pipe\n"); ::osl::StreamPipe aSenderPipe( aTestPipeName, osl_Pipe_OPEN ); // aTestPipeName is a string = "TestPipe" if ( aSenderPipe.is() == sal_False ) { - t_print("pipe open failed! \n"); + printf("pipe open failed! \n"); } else { - t_print("read\n"); + printf("read\n"); nChars = aSenderPipe.read( buf, m_pTestString1.getLength() + 1 ); if ( nChars < 0 ) { - t_print("read failed! \n"); + printf("read failed! \n"); return; } - t_print("buffer is %s \n", buf); - t_print("send\n"); + printf("buffer is %s \n", buf); + printf("send\n"); nChars = aSenderPipe.send( m_pTestString2.getStr(), m_pTestString2.getLength() + 1 ); if ( nChars < 0 ) { - t_print("client send failed! \n"); + printf("client send failed! \n"); return; } } @@ -951,7 +954,7 @@ namespace osl_StreamPipe ::osl::StreamPipe aConnectionPipe; Pipe_DataSource_Thread( ) { - t_print("create pipe\n"); + printf("create pipe\n"); aListenPipe.create( aTestPipeName, osl_Pipe_CREATE ); } ~Pipe_DataSource_Thread( ) @@ -964,40 +967,40 @@ namespace osl_StreamPipe //create pipe. sal_Int32 nChars; //::osl::StreamPipe aListenPipe( aTestPipeName, osl_Pipe_CREATE ); - t_print("listen\n"); + printf("listen\n"); if ( aListenPipe.is() == sal_False ) { - t_print("pipe create failed! \n"); + printf("pipe create failed! \n"); } else { //::osl::StreamPipe aConnectionPipe; //start server and wait for connection. - t_print("accept\n"); + printf("accept\n"); if ( osl_Pipe_E_None != aListenPipe.accept( aConnectionPipe ) ) { - t_print("pipe accept failed!"); + printf("pipe accept failed!"); return; } - t_print("write\n"); + printf("write\n"); // write to pipe nChars = aConnectionPipe.write( m_pTestString1.getStr(), m_pTestString1.getLength() + 1 ); if ( nChars < 0) { - t_print("server write failed! \n"); + printf("server write failed! \n"); return; } - t_print("recv\n"); + printf("recv\n"); nChars = aConnectionPipe.recv( buf, 256 ); if ( nChars < 0) { - t_print("server receive failed! \n"); + printf("server receive failed! \n"); return; } //thread_sleep( 2 ); - t_print("received message is: %s\n", buf ); + printf("received message is: %s\n", buf ); //aConnectionPipe.close(); } } @@ -1048,16 +1051,11 @@ namespace osl_StreamPipe }; // class recv // ----------------------------------------------------------------------------- - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::ctors, "osl_StreamPipe"); -//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::assign, "osl_StreamPipe"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::recv, "osl_StreamPipe"); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::ctors); +//CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::assign); + CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::recv); // ----------------------------------------------------------------------------- } // namespace osl_StreamPipe - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sal/qa/osl/pipe/osl_Pipe.xsce b/sal/qa/osl/pipe/osl_Pipe.xsce deleted file mode 100644 index d96a915d8ab9..000000000000 --- a/sal/qa/osl/pipe/osl_Pipe.xsce +++ /dev/null @@ -1,9 +0,0 @@ -#i23307# -osl_Pipe.getError.getError_001 wntmsci -osl_Pipe.getError.getError_002 wntmsci - -osl_StreamPipe.recv.recv_002 wntmsci unxsols -# osl_Pipe.ctors.ctors_acquire wntmsci - -#i27889# -osl_Pipe.ctors.ctors_no_acquire wntmsci diff --git a/sal/qa/osl/pipe/osl_Pipe_Const.h b/sal/qa/osl/pipe/osl_Pipe_Const.h deleted file mode 100644 index 0b70655eabc0..000000000000 --- a/sal/qa/osl/pipe/osl_Pipe_Const.h +++ /dev/null @@ -1 +0,0 @@ -// no longer used diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk index 482bc69276a2..8e9c0412e401 100644 --- a/sal/qa/osl/profile/makefile.mk +++ b/sal/qa/osl/profile/makefile.mk @@ -28,6 +28,11 @@ # for a copy of the LGPLv3 License. # #************************************************************************* + +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + PRJ=..$/..$/.. PRJNAME=sal @@ -48,11 +53,12 @@ SHL1OBJS= \ $(SLO)$/osl_old_testprofile.obj SHL1TARGET= osl_old_testprofile -SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = $(PRJ)$/qa$/export.map +SHL1RPATH = NONE # END ------------------------------------------------------------------ @@ -66,4 +72,4 @@ SLOFILES=\ .INCLUDE : target.mk .INCLUDE : _cppunit.mk - +.END diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx index 27e4cbe6b35b..65495407241d 100644 --- a/sal/qa/osl/profile/osl_old_testprofile.cxx +++ b/sal/qa/osl/profile/osl_old_testprofile.cxx @@ -40,7 +40,10 @@ #include <stdio.h> #include <osl/profile.h> -#include <testshl/simpleheader.hxx> +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" //================================================================================================== // ----------------------------------------------------------------------------- @@ -67,7 +70,7 @@ void oldtests::test_profile(void) // successful write - if (hProfile = osl_openProfile( ustrProfileName, 0 )) + if ((hProfile = osl_openProfile( ustrProfileName, 0 ))) { if (! osl_writeProfileBool( hProfile, "testsection", "testbool", 1 )) printf( "### cannot write into init file!\n" ); @@ -76,7 +79,7 @@ void oldtests::test_profile(void) } // unsuccessful write - if (hProfile = osl_openProfile( ustrProfileName2, 0 )) + if ((hProfile = osl_openProfile( ustrProfileName2, 0 ))) { if (osl_writeProfileBool( hProfile, "testsection", "testbool", 1 )) printf( "### unexpected success writing into test2.ini!\n" ); @@ -91,7 +94,7 @@ void oldtests::test_profile(void) } // namespace osl_Profile // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_Profile::oldtests, "osl_Profile" ); +CPPUNIT_TEST_SUITE_REGISTRATION( osl_Profile::oldtests ); // ----------------------------------------------------------------------------- -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); |