kerneltest/e32test/usbho/t_otgdi/src/testcase1233.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase1233.cpp	Wed Aug 18 11:08:29 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase1233.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"
@@ -24,11 +24,16 @@
 #include "testcaseroot.h"
 #include "b2bwatchers.h"
 #include "testcase1233.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testcase1233Traces.h"
+#endif
 
 #include <e32debug.h> 
 
 #define LOG_INTO_STEP(a) test.Printf(_L("\nInto Step [%S]\n\n"), &a);
 
+
 /* **************************************************************************************
  * the name below is used to add a pointer to our construction method to a pointer MAP in 
  * the class factory
@@ -38,7 +43,10 @@
 
 CTestCase1233* CTestCase1233::NewL(TBool aHost)
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_NEWL);
+	    }
 	CTestCase1233* self = new (ELeave) CTestCase1233(aHost);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -50,7 +58,10 @@
 CTestCase1233::CTestCase1233(TBool aHost)
 	: CTestCaseB2BRoot(KTestCaseId, aHost, iStatus) 
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_CTESTCASE1233);
+	    }
 		
 	} 
 
@@ -60,7 +71,10 @@
 */
 void CTestCase1233::ConstructL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_CONSTRUCTL);
+	    }
 
 	iTestVID = 0x0E22;		// Symbian
 	iTestPID = 0xF000 + 1233; // Test 1233
@@ -71,7 +85,10 @@
 
 CTestCase1233::~CTestCase1233()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_DCTESTCASE1233);
+	    }
 	iCollector.DestroyObservers();
 	Cancel();
 	}
@@ -79,7 +96,10 @@
 
 void CTestCase1233::ExecuteTestCaseL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_EXECUTETESTCASEL);
+	    }
 	iCaseStep = EPreconditions;
 	CActiveScheduler::Add(this);
 	SelfComplete();
@@ -88,7 +108,10 @@
 	
 void CTestCase1233::DoCancel()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_DOCANCEL);
+	    }
 	// cancel our timer
 	iTimer.Cancel();
 	}
@@ -96,7 +119,10 @@
 
 void CTestCase1233::RunStepL()
 	{
-	LOG_FUNC
+	if(gVerboseOutput)
+	    {
+	    OstTraceFunctionEntry0(CTESTCASE1233_RUNSTEPL);
+	    }
 	
 	// Obtain the completion code for this CActive obj.
 	TInt completionCode(iStatus.Int()); 
@@ -186,6 +212,7 @@
 			if ( iTestPID > 0x0108 )
 				{
 				test.Printf(_L("All VID/PID pairs done\n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP01, "All VID/PID pairs done\n");
 				
 				iCaseStep = EUnloadLdd;
 				}
@@ -195,6 +222,7 @@
 					{
 					// B
 					test.Printf(_L("Setting VID/PID of 0x%04x/0x%04x\n"),iTestVID,iTestPID);
+					OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP02, "Setting VID/PID of 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID);
 					
 					if (!StepChangeVidPid(iTestVID,iTestPID))
 						{
@@ -205,6 +233,7 @@
 					{
 					// A
 					test.Printf(_L("Expecting VID/PID of 0x%04x/0x%04x\n"),iTestVID,iTestPID);
+					OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP03, "Expecting VID/PID of 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID);
 					}
 				
 				iCollector.ClearAllEvents();
@@ -239,6 +268,7 @@
 				{ 
 				// A device
 				test.Printf(_L("Raising VBUS for VID/PID = 0x%04x/0x%04x\n"),iTestVID,iTestPID);
+				OstTraceExt2(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP04, "Raising VBUS for VID/PID = 0x%04x/0x%04x\n",(TUint32)iTestVID,(TUint32)iTestPID);
 				
 				if ( otgBusRequest() != KErrNone )
 					{
@@ -267,11 +297,13 @@
 			if ( otgVbusPresent() )
 				{
 				test.Printf(_L("...VBUS is UP\n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP05, "...VBUS is UP\n");
 				iCaseStep = EDropVBus;
 				}
 			else
 				{
 				test.Printf(_L("...VBUS is DOWN\n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP06, "...VBUS is DOWN\n");
 				return TestFailed(KErrAbort, _L("Vbus did not rise - FAILED!"));
 				}
 
@@ -344,11 +376,13 @@
 			if ( otgVbusPresent() )
 				{
 				test.Printf(_L("...VBUS is UP\n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP07, "...VBUS is UP\n");
 				return TestFailed(KErrAbort, _L("Vbus did not rise - FAILED!"));
 				}
 			else
 				{
 				test.Printf(_L("...VBUS is DOWN\n"));
+				OstTrace0(TRACE_NORMAL, CTESTCASE1233_RUNSTEPL_DUP08, "...VBUS is DOWN\n");
 				iCaseStep = ELoopToNextPID;
 				}