os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/exampletestcase.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// @internalComponent
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef EXAMPLETESTCASE_H
sl@0
    19
#define EXAMPLETESTCASE_H
sl@0
    20
sl@0
    21
sl@0
    22
	
sl@0
    23
/**	
sl@0
    24
	@SYMTestCaseID				EXAMPLETESTCASE
sl@0
    25
	@SYMTestCaseDesc			Description - shows various test-framework features
sl@0
    26
	@SYMFssID 					none
sl@0
    27
	@SYMPREQ					preq#
sl@0
    28
	@SYMREQ						n/a
sl@0
    29
	@SYMTestType				UT
sl@0
    30
	@SYMTestPriority			1 
sl@0
    31
	@SYMTestActions 			1. Empty step
sl@0
    32
								2. Press any key step (with watchdog)
sl@0
    33
								3. Another press key step (with watchdog)
sl@0
    34
								4. Watchdog cancel function works
sl@0
    35
								5. delay step
sl@0
    36
								6. Empty step
sl@0
    37
								7. End the test
sl@0
    38
	@SYMTestExpectedResults 	Example
sl@0
    39
	@SYMTestStatus				Proto
sl@0
    40
	
sl@0
    41
*/
sl@0
    42
	
sl@0
    43
// Example test case:
sl@0
    44
// Something to test the Engine with if ever it changes. Verify development changes, and 
sl@0
    45
// new test-case creation steps here.
sl@0
    46
class CExampleTestCase : public CTestCaseRoot
sl@0
    47
	{
sl@0
    48
public:
sl@0
    49
	static CExampleTestCase* NewL(TBool aHost);
sl@0
    50
	virtual ~CExampleTestCase();
sl@0
    51
sl@0
    52
	void WatchdogExpired();
sl@0
    53
sl@0
    54
	virtual void ExecuteTestCaseL();
sl@0
    55
	void DoCancel();
sl@0
    56
	void RunStepL();
sl@0
    57
	
sl@0
    58
	//override the base-class
sl@0
    59
	void ProcessKey(TKeyCode &aKey);
sl@0
    60
	TInt GetStepIndex()	{ return(iCaseStep); };
sl@0
    61
		
sl@0
    62
	virtual void DescribePreconditions();
sl@0
    63
	
sl@0
    64
private:
sl@0
    65
	CExampleTestCase(TBool aHost);
sl@0
    66
	void ConstructL();
sl@0
    67
sl@0
    68
	
sl@0
    69
	CTestCaseWatchdog *iWDTimer;
sl@0
    70
	
sl@0
    71
	// cancel callback methods (not implemented as a 'Mixin)
sl@0
    72
	static void FuncA(CTestCaseRoot *pThis);
sl@0
    73
	static void FuncB(CTestCaseRoot *pThis);
sl@0
    74
	static void FuncC(CTestCaseRoot *pThis);
sl@0
    75
	
sl@0
    76
private:
sl@0
    77
sl@0
    78
	enum TCaseSteps
sl@0
    79
		{
sl@0
    80
		EFirstStep,
sl@0
    81
		ESecondStep,
sl@0
    82
		EThirdStep,
sl@0
    83
		EFourthStep,
sl@0
    84
		EFifthStep,
sl@0
    85
		ESixthStep,
sl@0
    86
		ELastStep	
sl@0
    87
		};
sl@0
    88
	
sl@0
    89
	TCaseSteps iCaseStep;
sl@0
    90
	
sl@0
    91
	const static TTestCaseFactoryReceipt<CExampleTestCase> iFactoryReceipt;
sl@0
    92
	
sl@0
    93
	
sl@0
    94
	};
sl@0
    95
	
sl@0
    96
	
sl@0
    97
#endif // EXAMPLETESTCASE_H