|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __T_HARDCODED_H__ |
|
20 #define __T_HARDCODED_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CTestAction; |
|
25 class RFs; |
|
26 class CConsoleBase; |
|
27 class Output; |
|
28 class TTestActionSpec; |
|
29 |
|
30 struct THardcodedTests |
|
31 { |
|
32 THardcodedTests(CTestAction* (*aAction)(class RFs &, class CConsoleBase &, |
|
33 class Output &, const class TTestActionSpec &),TPtrC8 aName, TInt aGrouping) |
|
34 { |
|
35 name.Set(aName); |
|
36 action = aAction; |
|
37 //Set the default groupings when reading tests |
|
38 groupings= aGrouping; |
|
39 }; |
|
40 CTestAction* (*action)(class RFs &,class CConsoleBase &,class Output &,const class TTestActionSpec &); |
|
41 TInt groupings; |
|
42 TPtrC8 name; |
|
43 }; |
|
44 |
|
45 |
|
46 #define START_HARDCODED_LIST static THardcodedTests theHardcodedTests[]={ |
|
47 // x is the class to create eg. TActionValidate |
|
48 // y is the name we give to the class instance when displaying results |
|
49 // z is the grouping parameter eg. INOOM | SMOKE |
|
50 #define HARDCODED_ITEM(x,y,z) THardcodedTests(&x::NewL,y,z) |
|
51 #define END_HARDCODED_LIST ,THardcodedTests(NULL,_L8(""),0)}; |
|
52 |
|
53 |
|
54 #endif |