kerneltest/e32test/usbho/t_otgdi/src/testcase0682.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0682.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0682.cpp	Wed Sep 01 12:34:56 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2009 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,10 +24,6 @@
 #include "testcaseroot.h"
 #include "b2bwatchers.h"
 #include "testcase0682.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0682Traces.h"
-#endif
 
 #define _REPEATS (oOpenIterations*3)
 
@@ -40,10 +36,7 @@
 
 CTestCase0682* CTestCase0682::NewL(TBool aHost)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_NEWL);
-	    }
+	LOG_FUNC
 	CTestCase0682* self = new (ELeave) CTestCase0682(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -56,10 +49,7 @@
 : 	CTestCaseB2BRoot(KTestCaseId, aHost, iStatus),
 	iFirstRoleSwap(ETrue)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_CTESTCASE0682);
-	    }
+	LOG_FUNC
 		
 	} 
 
@@ -69,10 +59,7 @@
 */
 void CTestCase0682::ConstructL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_CONSTRUCTL);
-	    }
+	LOG_FUNC
 
 	iDualRoleCase = ETrue;	// another back-back
 		
@@ -82,10 +69,7 @@
 
 CTestCase0682::~CTestCase0682()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_DCTESTCASE0682);
-	    }
+	LOG_FUNC
 	iCollector.DestroyObservers();
 	Cancel();
 	}
@@ -93,10 +77,7 @@
 
 void CTestCase0682::ExecuteTestCaseL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_EXECUTETESTCASEL);
-	    }
+	LOG_FUNC
 	iCaseStep = EPreconditions;
 	iHNPCounter = 3;	//	To be decremented to govern the number of times we do HNP.
 	CActiveScheduler::Add(this);
@@ -106,10 +87,7 @@
 	
 void CTestCase0682::DoCancel()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_DOCANCEL);
-	    }
+	LOG_FUNC
 	// cancel our timer
 	iTimer.Cancel();
 	}
@@ -120,24 +98,16 @@
 	if (gTestRoleMaster)
 		{ // "B" device
 		test.Printf(_L("***** Important note *****\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS, "***** Important note *****\n");
 		test.Printf(_L("Before commencing test, please\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP01, "Before commencing test, please\n");
 		test.Printf(_L("insert 'B'-cable end and activate\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP02, "insert 'B'-cable end and activate\n");
 		test.Printf(_L("the test on the 'A' device.\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP03, "the test on the 'A' device.\n");
 		test.Printf(_L("Then, press any key to continue.\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP04, "Then, press any key to continue.\n");
 		test.Printf(_L("**************************\n"));
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP05, "**************************\n");
 		}
 	else
 		{
 		test.Printf(KInsertACablePrompt);
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP06, KInsertACablePrompt);
 		test.Printf(KPressAnyKeyToContinue);
-		OstTrace0(TRACE_NORMAL, CTESTCASE0682_STEPB2BPRECONDITIONS_DUP07, KPressAnyKeyToContinue);
 		}
 
 	RequestCharacter();	
@@ -146,10 +116,7 @@
 // handle event completion	
 void CTestCase0682::RunStepL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0682_RUNSTEPL);
-	    }
+	LOG_FUNC
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -200,7 +167,6 @@
 		case EPerformSrp:
 			{
 			test.Printf(_L("Into EPerformSrp step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP01, "Into EPerformSrp step...\n");
 
 			if (gTestRoleMaster)
 				{
@@ -234,7 +200,6 @@
 		case EAReceivedSrp:		//	A-Device step only!
 			{
 			test.Printf(_L("Into EAReceivedSrp step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP02, "Into EAReceivedSrp step...\n");
 
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
@@ -263,7 +228,6 @@
 		case EDefaultRoles:
 			{
 			test.Printf(_L("Into EDefaultRoles step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP03, "Into EDefaultRoles step...\n");
 			
 			if ( --iHNPCounter >= 0)
 				{
@@ -296,7 +260,6 @@
 		case EBConfigured:	//	A B-Device only step!
 			{
 			test.Printf(_L("Into EBConfigured step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP04, "Into EBConfigured step...\n");
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				iCollector.DestroyObservers();
@@ -311,7 +274,6 @@
 		case EBSuspended:	
 			{
 			test.Printf(_L("Into EBSuspended step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP05, "Into EBSuspended step...\n");
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				iCollector.DestroyObservers();
@@ -330,7 +292,6 @@
 				if (KErrNone != err)
 					{
 					test.Printf(_L("BusRequest returned %d\n"),err);
-					OstTrace1(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP06, "BusRequest returned %d\n",err);
 					return TestFailed(KErrAbort, _L("BusRequest() failed!"));
 					}
 				}
@@ -348,7 +309,6 @@
 		case ESwappedRoles:
 			{
 			test.Printf(_L("Into ESwappedRoles step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP07, "Into ESwappedRoles step...\n");
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				iCollector.DestroyObservers();
@@ -374,7 +334,6 @@
 		case EAConfigured:	//	A-Device only step
 			{
 			test.Printf(_L("Into EWaitTillAConfigured step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP08, "Into EWaitTillAConfigured step...\n");
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				iCollector.DestroyObservers();
@@ -390,7 +349,6 @@
 		case EASuspended:	//	A-Device only step
 			{
 			test.Printf(_L("Into EWaitTillASuspended step...\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP09, "Into EWaitTillASuspended step...\n");
 			if (KTestCaseWatchdogTO == iStatus.Int())
 				{
 				iCollector.DestroyObservers();
@@ -458,7 +416,6 @@
 			
 		default:
 			test.Printf(_L("<Error> unknown test step"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0682_RUNSTEPL_DUP10, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));
 		}