diff -r fa9941cf3867 -r 667e88a979d7 loggingservices/eventlogger/test/src/t_logbadclient.cpp --- a/loggingservices/eventlogger/test/src/t_logbadclient.cpp Fri Mar 12 15:51:02 2010 +0200 +++ b/loggingservices/eventlogger/test/src/t_logbadclient.cpp Mon Mar 15 12:46:30 2010 +0200 @@ -18,6 +18,7 @@ #include #include "LogServShared.h" #include "logservcli.h" +#include "t_logutil.h" /////////////////////////////////////////////////////////////////////////////////////// @@ -78,48 +79,6 @@ static TPtrC8 TheLogIpcDataPtr((const TUint8*)&TheLogIpcData, sizeof(TheLogIpcData)); /////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////// -//Test macros and functions -void Check1(TInt aValue, TInt aLine, TBool aPrintThreadName = EFalse) - { - if(!aValue) - { - if(aPrintThreadName) - { - RThread th; - TName name = th.Name(); - RDebug::Print(_L("*** Thread %S, Line %d\r\n"), &name, aLine); - } - else - { - RDebug::Print(_L("*** Line %d\r\n"), aLine); - } - TheTest(EFalse, aLine); - } - } -void Check2(TInt aValue, TInt aExpected, TInt aLine, TBool aPrintThreadName = EFalse) - { - if(aValue != aExpected) - { - if(aPrintThreadName) - { - RThread th; - TName name = th.Name(); - RDebug::Print(_L("*** Thread %S, Line %d Expected error: %d, got: %d\r\n"), &name, aLine, aExpected, aValue); - } - else - { - RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue); - } - TheTest(EFalse, aLine); - } - } -#define TEST(arg) ::Check1((arg), __LINE__) -#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__) -#define TTEST(arg) ::Check1((arg), __LINE__, ETrue) -#define TTEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__, ETrue) - -/////////////////////////////////////////////////////////////////////////////////////// void PrintIterationCount(TInt aIteration) { @@ -130,7 +89,7 @@ TDateTime dt = time.DateTime(); TBuf<16> tbuf; tbuf.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond()); - RDebug::Print(_L("-----[%S] Test iterations: %d\r\n"), &tbuf, aIteration); + TheTest.Printf(_L("-----[%S] Test iterations: %d\r\n"), &tbuf, aIteration); } } @@ -290,20 +249,20 @@ TheTest.Printf(_L("##Iteration %d. Function %d. Thread \"%S\" already exists!\r\n"), data.iIteration, data.iFunction, &KTestThreadName); for(TInt i=0;i