epoc32/include/waptestutils.inl
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/waptestutils.inl	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,106 +0,0 @@
     1.4 -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -inline RTest& CWapTestHarness::Test()
    1.20 -//
    1.21 -//	Return iTest
    1.22 -	{
    1.23 -	return iTest;
    1.24 -	}
    1.25 -
    1.26 -inline void CWapTestHarness::DoResourceLeakTest(TBool aValue)
    1.27 -//
    1.28 -// Turn on/off the resource handle leak test
    1.29 -	{
    1.30 -	iDoResourceLeakTest = aValue;
    1.31 -	}
    1.32 -
    1.33 -inline void CWapTestHarness::DefaultLogFileName(TDes& aFileName)
    1.34 -//
    1.35 -//	Sets aFilename to "KLogsDir\LWapLogsDirName\<TEST HARNESS NAME>.<PLATFORM>.<VARIANT>.log"
    1.36 -	{
    1.37 -	aFileName.Copy(RProcess().FileName());
    1.38 -	TInt start = aFileName.LocateReverse('\\');
    1.39 -	TInt end = aFileName.LocateReverse('.');
    1.40 -	aFileName = aFileName.Mid(start + 1, end - start - 1);
    1.41 -
    1.42 -	// create the log filename
    1.43 -	aFileName.Insert(0, _L("\\"));
    1.44 -	aFileName.Insert(0, KWapLogsDirName);
    1.45 -	aFileName.Insert(0, KLogsDir);
    1.46 -
    1.47 -#if defined(__WINS__)
    1.48 -	aFileName.Append(_L(".WINS."));
    1.49 -#else
    1.50 -	aFileName.Append(_L(".MARM."));
    1.51 -#endif
    1.52 -
    1.53 -#if defined(_DEBUG)
    1.54 -	aFileName.Append(_L("DEB."));
    1.55 -#else
    1.56 -	aFileName.Append(_L("REL."));
    1.57 -#endif
    1.58 -
    1.59 -	aFileName.Append(_L("LOG"));
    1.60 -	}
    1.61 -
    1.62 -inline void CWapTestHarness::WriteComment(const TDesC& aComment)
    1.63 -//
    1.64 -//	Writes aComment to test log file, logging file and test harness
    1.65 -	{
    1.66 -	if(aComment.Length() < (KMaxFileName - 2))
    1.67 -		{
    1.68 -		iTest.Printf(_L("%S\n"), &aComment);
    1.69 -		iFlogger.Write(aComment);
    1.70 -		}
    1.71 -
    1.72 -#if defined (__LOGGING)
    1.73 -	__ASSERT_DEBUG(iLogPtr,Panic(EBadCLogPtr));
    1.74 -	__LOG (aComment);
    1.75 -#endif
    1.76 -	}
    1.77 -
    1.78 -inline void CWapTestHarness::CreateFlogger(const TDesC& aFileName, TInt aShowDate, TInt aShowTime)
    1.79 -//
    1.80 -//	Create log file in directory KLogsdir\KWapLogsDirName - Note: ingore Drive and Path of aFilename
    1.81 -	{
    1.82 -	iFlogger.Connect();
    1.83 -	TParse p;
    1.84 -	p.Set(aFileName, NULL, NULL);
    1.85 -	iFlogger.CreateLog(KWapLogsDirName, p.NameAndExt(), EFileLoggingModeOverwrite);
    1.86 -	iFlogger.SetDateAndTime(aShowDate, aShowTime);
    1.87 -	iFlogger.Write(KTestHeader);
    1.88 -	}
    1.89 -
    1.90 -inline TPtr CWapTestHarness::CTestInfo::Name() const
    1.91 -//
    1.92 -//	Returns name
    1.93 -	{
    1.94 -	return iName->Des();
    1.95 -	}
    1.96 -
    1.97 -inline TInt CWapTestHarness::CTestInfo::Number() const
    1.98 -//
    1.99 -//	Returns number
   1.100 -	{
   1.101 -	return iNumber;
   1.102 -	}
   1.103 -
   1.104 -inline TInt CWapTestHarness::CTestInfo::ErrorCode() const
   1.105 -//
   1.106 -//	Returns errorcode
   1.107 -	{
   1.108 -	return iErrorCode;
   1.109 -	}