--- a/kerneltest/e32test/usbho/t_otgdi/src/testcase0461.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/usbho/t_otgdi/src/testcase0461.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 "testcasewd.h"
#include "testcase0461.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "testcase0461Traces.h"
-#endif
@@ -39,10 +35,7 @@
CTestCase0461* CTestCase0461::NewL(TBool aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_NEWL);
- }
+ LOG_FUNC
CTestCase0461* self = new (ELeave) CTestCase0461(aHost);
CleanupStack::PushL(self);
self->ConstructL();
@@ -54,10 +47,7 @@
CTestCase0461::CTestCase0461(TBool aHost)
: CTestCaseRoot(KTestCaseId, aHost)
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_CTESTCASE0461);
- }
+ LOG_FUNC
}
@@ -67,10 +57,7 @@
*/
void CTestCase0461::ConstructL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_CONSTRUCTL);
- }
+ LOG_FUNC
iRepeats = KOperationRetriesMax;
BaseConstructL();
@@ -80,10 +67,7 @@
CTestCase0461::~CTestCase0461()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_DCTESTCASE0461);
- }
+ LOG_FUNC
Cancel();
delete iWDTimer;
@@ -92,10 +76,7 @@
void CTestCase0461::ExecuteTestCaseL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_EXECUTETESTCASEL);
- }
+ LOG_FUNC
iCaseStep = ELoadLdd;
CActiveScheduler::Add(this);
@@ -107,16 +88,12 @@
void CTestCase0461::DescribePreconditions()
{
test.Printf(_L("Insert 'A' connector beforehand.\n"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_DESCRIBEPRECONDITIONS, "Insert 'A' connector beforehand.\n");
}
void CTestCase0461::DoCancel()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_DOCANCEL);
- }
+ LOG_FUNC
// cancel our timer
iTimer.Cancel();
@@ -134,10 +111,7 @@
// handle event completion
void CTestCase0461::RunStepL()
{
- if(gVerboseOutput)
- {
- OstTraceFunctionEntry0(CTESTCASE0461_RUNSTEPL);
- }
+ LOG_FUNC
// Obtain the completion code for this CActive obj.
TInt completionCode(iStatus.Int());
TBuf<MAX_DSTRLEN> aDescription;
@@ -154,9 +128,7 @@
}
// prompt to insert connector
test.Printf(KInsertAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP01, KInsertAConnectorPrompt);
test.Printf(KPressAnyKeyToContinue);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP02, KPressAnyKeyToContinue);
RequestCharacter();
break;
@@ -175,7 +147,6 @@
case ERegisterForEvents:
// prompt to remove connector
test.Printf(KRemoveAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP03, KRemoveAConnectorPrompt);
if (iDequeAttempts > 3)
{
return (TestFailed(KErrCorrupt, _L("<Error> too many irrelevant/incorrect events")));
@@ -208,7 +179,6 @@
case EGetAndCancelEvent: //4.
OtgEventString(iOTGEvent, aDescription);
test.Printf(_L("Received event %d '%S' status(%d)"), iOTGEvent, &aDescription, completionCode);
- OstTraceExt3(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP04, "Received event %d '%S' status(%d)", iOTGEvent, aDescription, completionCode);
if (RUsbOtgDriver::EEventAPlugRemoved == iOTGEvent)
{
otgQueueOtgEventRequest( iOTGEvent, iStatus);
@@ -242,10 +212,8 @@
iWDTimer->Cancel();
iConsole->ReadCancel();
test.Printf(KInsertAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP05, KInsertAConnectorPrompt);
iCaseStep = ERemoveA;
test.Printf(KPressAnyKeyToContinue);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP06, KPressAnyKeyToContinue);
RequestCharacter();
iWDTimer->IssueRequest(KDelayDurationForUserActivityMS, this, &CancelKB);
@@ -258,7 +226,6 @@
iWDTimer->Cancel();
iConsole->ReadCancel();
test.Printf(KRemoveAConnectorPrompt);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP07, KRemoveAConnectorPrompt);
if (iRepeats-- >0)
{
// Do it again please
@@ -269,7 +236,6 @@
iCaseStep = ETallyEvents;
}
test.Printf(KPressAnyKeyToContinue);
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP08, KPressAnyKeyToContinue);
RequestCharacter();
iWDTimer->IssueRequest(KDelayDurationForUserActivityMS, this, &CancelKB);
@@ -308,7 +274,6 @@
default:
test.Printf(_L("<Error> unknown test step"));
- OstTrace0(TRACE_NORMAL, CTESTCASE0461_RUNSTEPL_DUP09, "<Error> unknown test step");
Cancel();
return (TestFailed(KErrCorrupt, _L("<Error> unknown test step")));