kerneltest/e32test/usbho/t_otgdi/src/testcase0459.cpp
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0459.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0459.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"
@@ -25,10 +25,6 @@
 #include "testcaseroot.h"
 #include "testcasefactory.h"
 #include "testcase0459.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0459Traces.h"
-#endif
 
 
 
@@ -39,10 +35,7 @@
 
 CTestCase0459* CTestCase0459::NewL(TBool aHost)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_NEWL);
-	    }
+	LOG_FUNC
 	CTestCase0459* self = new (ELeave) CTestCase0459(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -54,10 +47,7 @@
 CTestCase0459::CTestCase0459(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_CTESTCASE0459);
-	    }
+	LOG_FUNC
 		
 	} 
 
@@ -67,10 +57,7 @@
 */
 void CTestCase0459::ConstructL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_CONSTRUCTL);
-	    }
+	LOG_FUNC
 	
 	BaseConstructL();
 	}
@@ -78,10 +65,7 @@
 
 CTestCase0459::~CTestCase0459()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_DCTESTCASE0459);
-	    }
+	LOG_FUNC
 
 	Cancel();
 	}
@@ -89,10 +73,7 @@
 
 void CTestCase0459::ExecuteTestCaseL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_EXECUTETESTCASEL);
-	    }
+	LOG_FUNC
 	iCaseStep = EPreconditions;
 	
 	CActiveScheduler::Add(this);
@@ -104,16 +85,12 @@
 void CTestCase0459::DescribePreconditions()
 	{
 	test.Printf(_L("Remove 'A' connector beforehand.\n"));
-	OstTrace0(TRACE_NORMAL, CTESTCASE0459_DESCRIBEPRECONDITIONS, "Remove 'A' connector beforehand.\n");
 	}
 
 	
 void CTestCase0459::DoCancel()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_DOCANCEL);
-	    }
+	LOG_FUNC
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -123,10 +100,7 @@
 // handle event completion	
 void CTestCase0459::RunStepL()
 	{
-	if(gVerboseOutput)
-	    {
-	    OstTraceFunctionEntry0(CTESTCASE0459_RUNSTEPL);
-	    }
+	LOG_FUNC
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -143,9 +117,7 @@
 				}
 			// prompt to remove connector
 			test.Printf(KRemoveAConnectorPrompt);
-			OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP01, KRemoveAConnectorPrompt);
 			test.Printf(KPressAnyKeyToContinue);
-			OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
 			RequestCharacter();			
 			break;
 			
@@ -168,10 +140,8 @@
 				}
 
 			test.Printf(KInsertAConnectorPrompt);
-			OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP03, KInsertAConnectorPrompt);
 			iCaseStep = ETestStateA;
 			test.Printf(_L("Waiting for OTG Event\n"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP04, "Waiting for OTG Event\n");
 
 			otgQueueOtgEventRequest( iOTGEvent, iStatus);
 
@@ -196,7 +166,6 @@
 			TTimeIntervalMicroSeconds ivlMicro(iIDcheckEnd.MicroSecondsFrom(iIDcheckStart));
 			aMillisec = (TInt)(ivlMicro.Int64())/1000;	// USB times are in uSec, but in ms for the user layer
 			test.Printf(_L("Received event %d '%S' status(%d) in %d ms"), iOTGEvent, &aDescription, completionCode, aMillisec);
-			OstTraceExt4(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP05, "Received event %d '%S' status(%d) in %d ms", iOTGEvent, aDescription, completionCode, aMillisec);
 			
 			// check the parameters gathered
 			if (RUsbOtgDriver::EEventAPlugInserted == iOTGEvent)
@@ -207,7 +176,6 @@
 					{
 					// 'A' was in the receptacle when we started the stack, so it fires immediately, consume it and wait for another.
 					test.Printf(_L("Please first remove and then replace the A connector.\n"));
-					OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP06, "Please first remove and then replace the A connector.\n");
 					// wrong event in the Q already, keep at it
 					iCaseStep = ERegisterForEvents;	
 					}
@@ -231,7 +199,6 @@
 
 		default:
 			test.Printf(_L("<Error> unknown test step"));
-			OstTrace0(TRACE_NORMAL, CTESTCASE0459_RUNSTEPL_DUP07, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));