kerneltest/e32test/usbho/t_otgdi/src/testcase0464.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0464.cpp	Wed Aug 18 11:08:29 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0464.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"
@@ -23,6 +23,10 @@
 #include <e32Test.h>	// RTest headder
 #include "testcaseroot.h"
 #include "testcase0464.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase0464Traces.h"
+#endif
 
 
 
@@ -33,7 +37,10 @@
 
 CTestCase0464* CTestCase0464::NewL(TBool aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_NEWL);
+	    }
 	CTestCase0464* self = new (ELeave) CTestCase0464(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -45,7 +52,10 @@
 CTestCase0464::CTestCase0464(TBool aHost)
 :	CTestCaseRoot(KTestCaseId, aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_CTESTCASE0464);
+	    }
 		
 	} 
 
@@ -55,7 +65,10 @@
 */
 void CTestCase0464::ConstructL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_CONSTRUCTL);
+	    }
 
 	BaseConstructL();
 	}
@@ -63,7 +76,10 @@
 
 CTestCase0464::~CTestCase0464()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_DCTESTCASE0464);
+	    }
 
 	Cancel();
 	}
@@ -71,7 +87,10 @@
 
 void CTestCase0464::ExecuteTestCaseL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_EXECUTETESTCASEL);
+	    }
 	iCaseStep = EPreconditions;
 	
 	CActiveScheduler::Add(this);
@@ -82,12 +101,16 @@
 void CTestCase0464::DescribePreconditions()
 	{
 	test.Printf(_L("Insert 'A' connector beforehand.\n"));
+	OstTrace0(TRACE_NORMAL, CTESTCASE0464_DESCRIBEPRECONDITIONS, "Insert 'A' connector beforehand.\n");
 	}
 
 	
 void CTestCase0464::DoCancel()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_DOCANCEL);
+	    }
 
 	// cancel our timer
 	iTimer.Cancel();
@@ -107,7 +130,10 @@
 // handle event completion	
 void CTestCase0464::RunStepL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE0464_RUNSTEPL);
+	    }
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
 	TBuf<MAX_DSTRLEN> aDescription;
@@ -125,7 +151,9 @@
 				}
 			// prompt to insert 'A' connector
 			test.Printf(KInsertAConnectorPrompt);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0464_RUNSTEPL_DUP01, KInsertAConnectorPrompt);
 			test.Printf(KPressAnyKeyToContinue);
+			OstTrace0(TRACE_NORMAL, CTESTCASE0464_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
 			RequestCharacter();			
 			break;
 
@@ -141,6 +169,10 @@
 
 		case EDriveBus:
 			LOG_VERBOSE1(_L("Turn ON VBus\n"))
+			if(gVerboseOutput)
+			    {
+			    OstTrace0(TRACE_VERBOSE, CTESTCASE0464_RUNSTEPL_DUP03, "Turn ON VBus\n");
+			    }
 			err = otgBusRequest();
 			if (KErrNone != err)
 				{
@@ -152,19 +184,29 @@
 
 		case EUnloadLdd:
 			LOG_VERBOSE1(_L("Unload.\n"))
+			if(gVerboseOutput)
+			    {
+			    OstTrace0(TRACE_VERBOSE, CTESTCASE0464_RUNSTEPL_DUP04, "Unload.\n");
+			    }
 			if (EFalse == StepUnloadLDD())
 				return TestFailed(KErrAbort,_L("unload Ldd failure"));	
 			test.Printf(_L("Measure VBus =0 and then press Y or N to continue."));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0464_RUNSTEPL_DUP05, "Measure VBus =0 and then press Y or N to continue.");
 			RequestCharacter();
 			iCaseStep = EVerifyVBusGone;
 			break;
 
 		case EVerifyVBusGone:
 			LOG_VERBOSE1(_L("Test !VBus after unload.\n"))
+			if(gVerboseOutput)
+			    {
+			    OstTrace0(TRACE_VERBOSE, CTESTCASE0464_RUNSTEPL_DUP06, "Test !VBus after unload.\n");
+			    }
 			// test key response (or via an API)
 			if (('y' == iKeyCodeInput) ||('Y' == iKeyCodeInput))
 				{
 				test.Printf(_L("VBUS drop 'seen' \n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE0464_RUNSTEPL_DUP07, "VBUS drop 'seen' \n");
 				SelfComplete();
 				}
 			else
@@ -179,6 +221,7 @@
 
 		default:
 			test.Printf(_L("<Error> unknown test step"));
+			OstTrace0(TRACE_NORMAL, CTESTCASE0464_RUNSTEPL_DUP08, "<Error> unknown test step");
 			Cancel();
 			return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));