|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : ttimer.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "ttimer.h" |
|
19 |
|
20 |
|
21 |
|
22 CTesttimer::~CTesttimer() |
|
23 { |
|
24 } |
|
25 |
|
26 CTesttimer::CTesttimer(const TDesC& aStepName) |
|
27 { |
|
28 // MANDATORY Call to base class method to set up the human readable name for logging. |
|
29 SetTestStepName(aStepName); |
|
30 } |
|
31 |
|
32 TVerdict CTesttimer::doTestStepPreambleL() |
|
33 { |
|
34 __UHEAP_MARK; |
|
35 SetTestStepResult(EPass); |
|
36 return TestStepResult(); |
|
37 } |
|
38 |
|
39 |
|
40 |
|
41 TVerdict CTesttimer::doTestStepPostambleL() |
|
42 { |
|
43 __UHEAP_MARKEND; |
|
44 iParamCnt=0; |
|
45 return TestStepResult(); |
|
46 } |
|
47 |
|
48 |
|
49 TVerdict CTesttimer::doTestStepL() |
|
50 { |
|
51 int err; |
|
52 if(TestStepName() == KTesttimerapi1) |
|
53 { |
|
54 INFO_PRINTF1(_L("Testtimerapi1():")); |
|
55 err = Testtimerapi1(); |
|
56 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
57 } |
|
58 if(TestStepName() == KTesttimerapi2) |
|
59 { |
|
60 INFO_PRINTF1(_L("Testtimerapi2():")); |
|
61 err = Testtimerapi2(); |
|
62 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
63 } |
|
64 if(TestStepName() == KTesttimerapi3) |
|
65 { |
|
66 INFO_PRINTF1(_L("Testtimerapi3():")); |
|
67 err = Testtimerapi3(); |
|
68 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
69 } |
|
70 if(TestStepName() == KTesttimerapi4) |
|
71 { |
|
72 INFO_PRINTF1(_L("Testtimerapi4():")); |
|
73 err = Testtimerapi4(); |
|
74 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
75 } |
|
76 if(TestStepName() == KTesttimerapi5) |
|
77 { |
|
78 INFO_PRINTF1(_L("Testtimerapi5():")); |
|
79 err = Testtimerapi5(); |
|
80 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
81 } |
|
82 if(TestStepName() == KTesttimerapi6) |
|
83 { |
|
84 INFO_PRINTF1(_L("Testtimerapi6():")); |
|
85 err = Testtimerapi6(); |
|
86 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
87 } |
|
88 if(TestStepName() == KTesttimerapi7) |
|
89 { |
|
90 INFO_PRINTF1(_L("Testtimerapi7():")); |
|
91 err = Testtimerapi7(); |
|
92 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
93 } |
|
94 if(TestStepName() == KTesttimerapi8) |
|
95 { |
|
96 INFO_PRINTF1(_L("Testtimerapi8():")); |
|
97 err = Testtimerapi8(); |
|
98 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
99 } |
|
100 if(TestStepName() == KTesttimerapi9) |
|
101 { |
|
102 INFO_PRINTF1(_L("Testtimerapi9():")); |
|
103 err = Testtimerapi9(); |
|
104 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
105 } |
|
106 if(TestStepName() == KTesttimerapi10) |
|
107 { |
|
108 INFO_PRINTF1(_L("Testtimerapi10():")); |
|
109 err = Testtimerapi10(); |
|
110 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
111 } |
|
112 if(TestStepName() == KTesttimerapi11) |
|
113 { |
|
114 INFO_PRINTF1(_L("Testtimerapi11():")); |
|
115 err = Testtimerapi11(); |
|
116 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
117 } |
|
118 if(TestStepName() == KTesttimerapi12) |
|
119 { |
|
120 INFO_PRINTF1(_L("Testtimerapi12():")); |
|
121 err = Testtimerapi12(); |
|
122 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
123 } |
|
124 if(TestStepName() == KTesttimerapi13) |
|
125 { |
|
126 INFO_PRINTF1(_L("Testtimerapi13():")); |
|
127 err = Testtimerapi13(); |
|
128 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
129 } |
|
130 if(TestStepName() == KTesttimerapi14) |
|
131 { |
|
132 INFO_PRINTF1(_L("Testtimerapi14():")); |
|
133 err = Testtimerapi14(); |
|
134 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
135 } |
|
136 if(TestStepName() == KTesttimerapi15) |
|
137 { |
|
138 INFO_PRINTF1(_L("Testtimerapi15():")); |
|
139 err = Testtimerapi15(); |
|
140 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
141 } |
|
142 if(TestStepName() == KTesttimerapi16) |
|
143 { |
|
144 INFO_PRINTF1(_L("Testtimerapi16():")); |
|
145 err = Testtimerapi16(); |
|
146 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
147 } |
|
148 if(TestStepName() == KTesttimerapi17) |
|
149 { |
|
150 INFO_PRINTF1(_L("Testtimerapi17():")); |
|
151 err = Testtimerapi17(); |
|
152 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
153 } |
|
154 if(TestStepName() == KTesttimerapi18) |
|
155 { |
|
156 INFO_PRINTF1(_L("Testtimerapi18():")); |
|
157 err = Testtimerapi18(); |
|
158 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
159 } |
|
160 if(TestStepName() == KTesttimerapi19) |
|
161 { |
|
162 INFO_PRINTF1(_L("Testtimerapi19():")); |
|
163 err = Testtimerapi19(); |
|
164 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
165 } |
|
166 if(TestStepName() == KTesttimerapi20) |
|
167 { |
|
168 INFO_PRINTF1(_L("Testtimerapi20():")); |
|
169 err = Testtimerapi20(); |
|
170 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
171 } |
|
172 if(TestStepName() == KTesttimerapi21) |
|
173 { |
|
174 INFO_PRINTF1(_L("Testtimerapi21():")); |
|
175 err = Testtimerapi21(); |
|
176 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
177 } |
|
178 if(TestStepName() == KTesttimerapi22) |
|
179 { |
|
180 INFO_PRINTF1(_L("Testtimerapi22():")); |
|
181 err = Testtimerapi22(); |
|
182 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
183 } |
|
184 if(TestStepName() == KTesttimerapi23) |
|
185 { |
|
186 INFO_PRINTF1(_L("Testtimerapi23():")); |
|
187 err = Testtimerapi23(); |
|
188 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
189 } |
|
190 if(TestStepName() == KTesttimerapi24) |
|
191 { |
|
192 INFO_PRINTF1(_L("Testtimerapi24():")); |
|
193 err = Testtimerapi24(); |
|
194 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
195 } |
|
196 if(TestStepName() == KTesttimerapi25) |
|
197 { |
|
198 INFO_PRINTF1(_L("Testtimerapi25():")); |
|
199 err = Testtimerapi25(); |
|
200 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
201 } |
|
202 if(TestStepName() == KTesttimerapi26) |
|
203 { |
|
204 INFO_PRINTF1(_L("Testtimerapi26():")); |
|
205 err = Testtimerapi26(); |
|
206 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
207 } |
|
208 if(TestStepName() == KTesttimerapi27) |
|
209 { |
|
210 INFO_PRINTF1(_L("Testtimerapi27():")); |
|
211 err = Testtimerapi27(); |
|
212 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
213 } |
|
214 if(TestStepName() == KTesttimerapi28) |
|
215 { |
|
216 INFO_PRINTF1(_L("Testtimerapi28():")); |
|
217 err = Testtimerapi28(); |
|
218 SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass); |
|
219 } |
|
220 |
|
221 return TestStepResult(); |
|
222 } |
|
223 |
|
224 |