kerneltest/e32test/usbho/t_otgdi/src/testcase0463.cpp
changeset 253 d37db4dcc88d
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0463.cpp	Tue Aug 24 14:42:58 2010 +0100
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0463.cpp	Tue Aug 24 14:49:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of the License "Eclipse Public License v1.0"
@@ -24,6 +24,10 @@
 #include <e32Test.h>	// RTest headder
 #include "testcaseroot.h"
 #include "testcase0463.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase0463Traces.h"
+#endif
 
 
 
@@ -36,7 +40,10 @@
 
 CTestCase0463* CTestCase0463::NewL(TBool aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_NEWL);
+	    }
 	CTestCase0463* self = new (ELeave) CTestCase0463(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -48,7 +55,10 @@
 CTestCase0463::CTestCase0463(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{	
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_CTESTCASE0463);
+	    }
 	} 
 
 
@@ -57,7 +67,10 @@
 */
 void CTestCase0463::ConstructL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_CONSTRUCTL);
+	    }
 	iRepeats = OOMOPEN_REPEATS;
 	iAllocFailNumber = OOMOPEN_REPEATS + 1; // allocs 1..11 fail
 	
@@ -67,7 +80,10 @@
 
 CTestCase0463::~CTestCase0463()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_DCTESTCASE0463);
+	    }
 
 	Cancel();
 	}
@@ -75,7 +91,10 @@
 
 void CTestCase0463::ExecuteTestCaseL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_EXECUTETESTCASEL);
+	    }
 	iCaseStep = EMarkStack;
 	CActiveScheduler::Add(this);
 
@@ -86,12 +105,16 @@
 void CTestCase0463::DescribePreconditions()
 	{
 	test.Printf(_L("Insert A connector beforehand.\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0463_DESCRIBEPRECONDITIONS, "Insert A connector beforehand.\n");
 	}
 
 	
 void CTestCase0463::DoCancel()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_DOCANCEL);
+	    }
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -101,7 +124,10 @@
 // handle event completion	
 void CTestCase0463::RunStepL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0463_RUNSTEPL);
+	    }
 
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
@@ -117,6 +143,7 @@
 			__UHEAP_SETFAIL(RHeap::EDeterministic, iAllocFailNumber);
 			__UHEAP_MARK;
 			test.Printf(_L("Load the LDD iteration %d/%d\n"), OOMOPEN_REPEATS-iRepeats+1, OOMOPEN_REPEATS);
+			OstTraceExt2(TRACE_NORMAL, CTESTCASE0463_RUNSTEPL_DUP01, "Load the LDD iteration %d/%d\n", OOMOPEN_REPEATS-iRepeats+1, OOMOPEN_REPEATS);
 			aIntegerP = new TInt;
 			CleanupStack::PushL(aIntegerP);
 			if (!StepLoadLDD())
@@ -143,12 +170,14 @@
 				return TestFailed(KErrAbort,_L("Unload Ldd failure"));	
 			__UHEAP_MARKEND;
 			test.Printf(_L("Heap intact: Asize %d\n"), iAllocFailNumber);
+			OstTrace1(TRACE_NORMAL, CTESTCASE0463_RUNSTEPL_DUP03, "Heap intact: Asize %d\n", iAllocFailNumber);
 			iCaseStep = ELoopDecrement;
 			SelfComplete();			
 			break;
 						
 		case ELoopDecrement:
 			test.Printf(_L("Repeat test\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0463_RUNSTEPL_DUP04, "Repeat test\n");
 			__UHEAP_RESET;
 			iAllocFailNumber--;
 			
@@ -166,6 +195,7 @@
 			
 		default:
 			test.Printf(_L("<Error> unknown test step"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0463_RUNSTEPL_DUP05, "<Error> unknown test step");
 			Cancel();
 			TestPolicy().SignalTestComplete(KErrCorrupt);
 			break;