kerneltest/e32test/usbho/t_otgdi/src/testcase0460.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0460.cpp	Wed Aug 18 11:08:29 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0460.cpp	Thu Sep 02 21:54:16 2010 +0300
@@ -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"
@@ -25,6 +25,10 @@
 #include "testcaseroot.h"
 #include "testcasefactory.h"
 #include "testcase0460.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase0460Traces.h"
+#endif
 
 
 
@@ -36,7 +40,10 @@
 
 CTestCase0460* CTestCase0460::NewL(TBool aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_NEWL);
+	    }
 	CTestCase0460* self = new (ELeave) CTestCase0460(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -48,7 +55,10 @@
 CTestCase0460::CTestCase0460(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_CTESTCASE0460);
+	    }
 		
 	} 
 
@@ -58,7 +68,10 @@
 */
 void CTestCase0460::ConstructL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_CONSTRUCTL);
+	    }
 	
 	BaseConstructL();
 	}
@@ -66,7 +79,10 @@
 
 CTestCase0460::~CTestCase0460()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_DCTESTCASE0460);
+	    }
 
 	Cancel();
 	}
@@ -74,7 +90,10 @@
 
 void CTestCase0460::ExecuteTestCaseL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_EXECUTETESTCASEL);
+	    }
 	iCaseStep = EPreconditions;
 	
 	CActiveScheduler::Add(this);
@@ -86,12 +105,16 @@
 void CTestCase0460::DescribePreconditions()
 	{
 	test.Printf(_L("Insert 'A' connector beforehand.\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0460_DESCRIBEPRECONDITIONS, "Insert 'A' connector beforehand.\n");
 	}
 
 	
 void CTestCase0460::DoCancel()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_DOCANCEL);
+	    }
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -101,7 +124,10 @@
 // handle event completion	
 void CTestCase0460::RunStepL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0460_RUNSTEPL);
+	    }
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -118,7 +144,9 @@
 				}
 			// prompt to remove connector
 			test.Printf(KRemoveAConnectorPrompt);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP01, KRemoveAConnectorPrompt);
 			test.Printf(KPressAnyKeyToContinue);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
 			RequestCharacter();			
 			break;
 			
@@ -133,7 +161,9 @@
 
 			// prompt to insert connector
 			test.Printf(KInsertAConnectorPrompt);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP03, KInsertAConnectorPrompt);
 			test.Printf(KPressAnyKeyToContinue);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP04, KPressAnyKeyToContinue);
 			RequestCharacter();			
 			break;
 			// wait on ID_PIN
@@ -145,6 +175,7 @@
 			iCaseStep = ETestStateA;
 
 			test.Printf(_L("Waiting for OTG Event\n"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP05, "Waiting for OTG Event\n");
 			otgQueueOtgEventRequest( iOTGEvent, iStatus);
 
 			SetActive();
@@ -160,6 +191,7 @@
 		case ETestStateA:
 			OtgEventString(iOTGEvent, aDescription);
 			test.Printf(_L("Received event %d '%S' status(%d)"), iOTGEvent, &aDescription, completionCode);
+			OstTraceExt3(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP06, "Received event %d '%S' status(%d)", iOTGEvent, aDescription, completionCode);
 			if (RUsbOtgDriver::EEventAPlugInserted == iOTGEvent)
 				{
 				iCaseStep = EUnloadLdd;
@@ -183,6 +215,7 @@
 
 		default:
 			test.Printf(_L("<Error> unknown test step"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0460_RUNSTEPL_DUP07, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));