|
1 /* |
|
2 * Copyright (c) 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 |
|
20 /* |
|
21 ------------------------------------------------------------------------------- |
|
22 |
|
23 DESCRIPTION |
|
24 |
|
25 This file contains the header file of MTest of |
|
26 CTestModule |
|
27 |
|
28 ------------------------------------------------------------------------------- |
|
29 */ |
|
30 |
|
31 #ifndef MTEST_H |
|
32 #define MTEST_H |
|
33 |
|
34 // INCLUDES |
|
35 #include "e32std.h" |
|
36 #include <stiftestmodule.h> |
|
37 #include "texecutionanddebuginfo.h" |
|
38 |
|
39 // Function pointer related internal definitions |
|
40 |
|
41 // Hack around known GCC bug. |
|
42 #ifndef __GCC32__ |
|
43 #define GETPTR |
|
44 #else |
|
45 #define GETPTR & |
|
46 #endif |
|
47 |
|
48 #if defined (_MSC_VER) && (_MSC_VER >= 1000) |
|
49 #pragma once |
|
50 #endif |
|
51 |
|
52 // CONSTANTS |
|
53 // None |
|
54 |
|
55 // MACROS |
|
56 // None |
|
57 |
|
58 // DATA TYPES |
|
59 // None |
|
60 |
|
61 // FUNCTION PROTOTYPES |
|
62 // None |
|
63 |
|
64 // FORWARD DECLARATIONS |
|
65 // None |
|
66 |
|
67 // CLASS DECLARATION |
|
68 class MTest; |
|
69 |
|
70 // A typedef for function that does the actual testing, |
|
71 // function is a type TInt NameOfFunction ( TTestResult& aResult ) |
|
72 typedef TInt (MTest::* MTestFunction)( TExecutionAndDebugInfo& ); |
|
73 |
|
74 // DESCRIPTION |
|
75 // Interface for test cases. |
|
76 class MTest |
|
77 { |
|
78 |
|
79 public: |
|
80 |
|
81 virtual const TText* GetCaseNameL( TInt aClassCase ) = 0; |
|
82 |
|
83 /** |
|
84 * Returns array of function pointers. |
|
85 * No ownership of the array is given to calling function. |
|
86 * @param None |
|
87 * @return CArrayFixFlat<MTestFunction>*, array of function pointers. |
|
88 */ |
|
89 virtual CArrayFixFlat<MTestFunction>* GetFunctionPtrArray() = 0; |
|
90 |
|
91 }; |
|
92 |
|
93 #endif |
|
94 |
|
95 // End of File |