kerneltest/e32test/usbho/t_otgdi/src/testpolicy.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    24 #include <e32cons.h>
    24 #include <e32cons.h>
    25 #include <e32Test.h>	// RTest headder
    25 #include <e32Test.h>	// RTest headder
    26 #include "testcaseroot.h"
    26 #include "testcaseroot.h"
    27 #include "testpolicy.h"
    27 #include "testpolicy.h"
    28 #include "testcasefactory.h"
    28 #include "testcasefactory.h"
       
    29 #include "OstTraceDefinitions.h"
       
    30 #ifdef OST_TRACE_COMPILER_IN_USE
       
    31 #include "testpolicyTraces.h"
       
    32 #endif
    29 
    33 
    30 
    34 
    31 
    35 
    32 
    36 
    33 CBasicTestPolicy* CBasicTestPolicy::NewL()
    37 CBasicTestPolicy* CBasicTestPolicy::NewL()
    47 	}
    51 	}
    48 
    52 
    49 		
    53 		
    50 void CBasicTestPolicy::ConstructL()
    54 void CBasicTestPolicy::ConstructL()
    51 	{
    55 	{
    52 	LOG_FUNC
    56 	if(gVerboseOutput)
       
    57 	    {
       
    58 	    OstTraceFunctionEntry0(CBASICTESTPOLICY_CONSTRUCTL);
       
    59 	    }
    53 
    60 
    54 	}
    61 	}
    55 	
    62 	
    56 
    63 
    57 CBasicTestPolicy::~CBasicTestPolicy()
    64 CBasicTestPolicy::~CBasicTestPolicy()
    68  the test-case may be stored in this class in future for access on ad-hoc basis as each test 
    75  the test-case may be stored in this class in future for access on ad-hoc basis as each test 
    69  case desires, without a need to modify all test cases
    76  case desires, without a need to modify all test cases
    70  */
    77  */
    71 void CBasicTestPolicy::RunTestCaseL(const TDesC& aTestCaseId, TRequestStatus* aNotifierStatus)
    78 void CBasicTestPolicy::RunTestCaseL(const TDesC& aTestCaseId, TRequestStatus* aNotifierStatus)
    72 	{
    79 	{
    73 	LOG_FUNC
    80 	if(gVerboseOutput)
       
    81 	    {
       
    82 	    OstTraceFunctionEntry0(CBASICTESTPOLICY_RUNTESTCASEL);
       
    83 	    }
    74 	iNotifierStatus = aNotifierStatus;
    84 	iNotifierStatus = aNotifierStatus;
    75 	// delete previous test run
    85 	// delete previous test run
    76 	if (iTestCase)
    86 	if (iTestCase)
    77 		{
    87 		{
    78 		delete iTestCase;
    88 		delete iTestCase;
   120 	}
   130 	}
   121 
   131 
   122 	
   132 	
   123 void CBasicTestPolicy::RunL()
   133 void CBasicTestPolicy::RunL()
   124 	{ 
   134 	{ 
   125 	LOG_FUNC
   135 	if(gVerboseOutput)
       
   136 	    {
       
   137 	    OstTraceFunctionEntry0(CBASICTESTPOLICY_RUNL);
       
   138 	    }
   126 	
   139 	
   127 	}
   140 	}
   128 
   141 
   129 
   142 
   130 TInt CBasicTestPolicy::RunError(TInt /*aError*/)
   143 TInt CBasicTestPolicy::RunError(TInt /*aError*/)