From f737c717b917685f574b0c462d2bebf63a2fae71 Mon Sep 17 00:00:00 2001 From: Theo van Klaveren Date: Thu, 17 Mar 2011 13:32:10 +0100 Subject: Make the qa/rtl/rtl_logfile test compile again. --- sal/qa/rtl/logfile/rtl_logfile.cxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'sal/qa/rtl/logfile') diff --git a/sal/qa/rtl/logfile/rtl_logfile.cxx b/sal/qa/rtl/logfile/rtl_logfile.cxx index f3a482fb3c95..4d82eda190f5 100644 --- a/sal/qa/rtl/logfile/rtl_logfile.cxx +++ b/sal/qa/rtl/logfile/rtl_logfile.cxx @@ -42,7 +42,6 @@ #endif #include -#include #include #if ( defined WNT ) // Windows @@ -51,6 +50,10 @@ #include #endif +#include +#include +#include + using namespace ::osl; inline void printUString( const ::rtl::OUString & str, const sal_Char * msg = "" ) @@ -58,11 +61,11 @@ inline void printUString( const ::rtl::OUString & str, const sal_Char * msg = "" if (strlen(msg) > 0) { - t_print("%s: ", msg ); + printf("%s: ", msg ); } rtl::OString aString; aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US ); - t_print("%s\n", (char *)aString.getStr( ) ); + printf("%s\n", (char *)aString.getStr( ) ); } /** get the absolute source file URL "file:///.../sal/qa/rtl/logfile/" @@ -150,7 +153,7 @@ namespace rtl_logfile sal_Char buffer_read[400]; sal_uInt64 nCount_read; nError1 = aTestFile.read( buffer_read, 400, nCount_read ); - //t_print("buffer is %s\n", buffer_read ); + //printf("buffer is %s\n", buffer_read ); CPPUNIT_ASSERT_MESSAGE("write right logs", strstr( buffer_read, "trace 1 2 3") != NULL ); aTestFile.sync(); aTestFile.close(); @@ -211,10 +214,10 @@ namespace rtl_logfile } // namespace rtl_logfile // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_logfile::logfile, "rtl_logfile" ); +CPPUNIT_TEST_SUITE_REGISTRATION( rtl_logfile::logfile); // ----------------------------------------------------------------------------- -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); //~ do some clean up work after all test completed. class GlobalObject @@ -224,7 +227,7 @@ public: { try { - t_print( "\n#Do some clean-ups ... only delete logfile1_*.log here!\n" ); + printf( "\n#Do some clean-ups ... only delete logfile1_*.log here!\n" ); rtl::OUString suFilePath = getTempPath(); suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logfile1_")) + getCurrentPID( ); suFilePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".log")); @@ -233,16 +236,16 @@ public: ::osl::FileBase::RC nError1; nError1 = osl::File::remove( suFilePath ); #ifdef WNT - t_print("Please remove logfile* manully! Error is Permision denied!"); + printf("Please remove logfile* manully! Error is Permision denied!"); #endif } catch (CppUnit::Exception &e) { - t_print("Exception caught in GlobalObject dtor(). Exception message: '%s'. Source line: %d\n", e.what(), e.sourceLine().lineNumber()); + printf("Exception caught in GlobalObject dtor(). Exception message: '%s'. Source line: %d\n", e.what(), e.sourceLine().lineNumber()); } catch (...) { - t_print("Exception caught (...) in GlobalObject dtor()\n"); + printf("Exception caught (...) in GlobalObject dtor()\n"); } } }; -- cgit