253
|
1 |
// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
|
0
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "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 |
// @file testcaseroot.cpp
|
|
15 |
// @internalComponent
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#include <e32std.h>
|
|
20 |
#include <e32std_private.h>
|
|
21 |
#include <u32std.h> // unicode builds
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <e32base_private.h>
|
|
24 |
#include <e32cons.h>
|
|
25 |
#include <e32Test.h> // RTest header
|
|
26 |
//#include <e32ver.h>
|
|
27 |
#include <e32def.h>
|
|
28 |
#include <e32def_private.h>
|
|
29 |
#include <d32otgdi.h> // OTGDI header
|
|
30 |
#include <d32usbc.h> // USBCC header
|
|
31 |
#include "testcaseroot.h"
|
253
|
32 |
#include "OstTraceDefinitions.h"
|
|
33 |
#ifdef OST_TRACE_COMPILER_IN_USE
|
|
34 |
#include "testcaserootTraces.h"
|
|
35 |
#endif
|
0
|
36 |
|
|
37 |
/* Implemention of classes CTestCaseRoot, CTestCaseB2BRoot
|
|
38 |
*
|
|
39 |
*/
|
|
40 |
|
|
41 |
/* ===============================================================
|
|
42 |
* The root test-case class, provides test-framework features
|
|
43 |
*/
|
|
44 |
CTestCaseRoot::CTestCaseRoot(const TDesC& aTestCaseId, TBool aAutomation)
|
|
45 |
: CActive(EPriorityUserInput),
|
|
46 |
COtgRoot(),
|
|
47 |
iAutomated(aAutomation)
|
|
48 |
{
|
|
49 |
iTestCaseId.Copy(aTestCaseId);
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
void CTestCaseRoot::BaseConstructL()
|
|
54 |
{
|
253
|
55 |
if(gVerboseOutput)
|
|
56 |
{
|
|
57 |
OstTraceFunctionEntry0(CTESTCASEROOT_BASECONSTRUCTL);
|
|
58 |
}
|
0
|
59 |
|
|
60 |
|
|
61 |
TInt err(iTimer.CreateLocal());
|
|
62 |
if (err == KErrNone)
|
|
63 |
{
|
|
64 |
LOG_VERBOSE1(_L("Test case timer created"));
|
253
|
65 |
if(gVerboseOutput)
|
|
66 |
{
|
|
67 |
OstTrace0(TRACE_VERBOSE, CTESTCASEROOT_BASECONSTRUCTL_DUP01, "Test case timer created");
|
|
68 |
}
|
0
|
69 |
}
|
|
70 |
else
|
|
71 |
{
|
253
|
72 |
OstTrace1(TRACE_NORMAL, CTESTCASEROOT_BASECONSTRUCTL_DUP02, "<Error %d> Test case timer could not be created",err);
|
0
|
73 |
User::Leave(err);
|
|
74 |
}
|
|
75 |
//
|
|
76 |
iConsole = test.Console();
|
|
77 |
iRequestedChar = EFalse;
|
|
78 |
}
|
|
79 |
|
|
80 |
|
|
81 |
CTestCaseRoot::~CTestCaseRoot()
|
|
82 |
{
|
253
|
83 |
if(gVerboseOutput)
|
|
84 |
{
|
|
85 |
OstTraceFunctionEntry0(CTESTCASEROOT_DCTESTCASEROOT);
|
|
86 |
}
|
0
|
87 |
Cancel();
|
|
88 |
}
|
|
89 |
|
|
90 |
// utility GUI methods
|
|
91 |
void CTestCaseRoot::DisplayTestCaseOptions()
|
|
92 |
{
|
253
|
93 |
if(gVerboseOutput)
|
|
94 |
{
|
|
95 |
OstTraceFunctionEntry0(CTESTCASEROOT_DISPLAYTESTCASEOPTIONS);
|
|
96 |
}
|
0
|
97 |
|
|
98 |
// commonly overridden to display any options for that test
|
|
99 |
test.Printf(_L("Press <ESC> to end the test.\n"));
|
253
|
100 |
OstTrace0(TRACE_NORMAL, CTESTCASEROOT_DISPLAYTESTCASEOPTIONS_DUP01, "Press <ESC> to end the test.\n");
|
0
|
101 |
}
|
|
102 |
|
|
103 |
|
|
104 |
/***********************************************************************/
|
|
105 |
//
|
|
106 |
void CTestCaseRoot::SetTestPolicy(CBasicTestPolicy* aTestPolicy)
|
|
107 |
{
|
|
108 |
iTestPolicy = aTestPolicy;
|
|
109 |
iAutomated = gSemiAutomated; // read the global flag at this time
|
|
110 |
}
|
|
111 |
|
|
112 |
|
|
113 |
CBasicTestPolicy& CTestCaseRoot::TestPolicy()
|
|
114 |
{
|
|
115 |
return *iTestPolicy;
|
|
116 |
}
|
|
117 |
|
|
118 |
|
|
119 |
void CTestCaseRoot::DoCancel()
|
|
120 |
{
|
253
|
121 |
if(gVerboseOutput)
|
|
122 |
{
|
|
123 |
OstTraceFunctionEntry0(CTESTCASEROOT_DOCANCEL);
|
|
124 |
}
|
0
|
125 |
}
|
|
126 |
|
|
127 |
|
|
128 |
/** ProcessKey
|
|
129 |
override this method to perform other tasks, the base-class does nothing so that
|
|
130 |
child classes can use it as an any-key-to-continue helper
|
|
131 |
*/
|
|
132 |
void CTestCaseRoot::ProcessKey(TKeyCode &aKey)
|
|
133 |
{// default implementation - reads the key.
|
|
134 |
iKeyCodeInput = aKey;
|
|
135 |
}
|
|
136 |
|
|
137 |
|
|
138 |
void CTestCaseRoot::ProcessEngineKey(TKeyCode &aKey)
|
|
139 |
{
|
253
|
140 |
if(gVerboseOutput)
|
|
141 |
{
|
|
142 |
OstTraceFunctionEntry0(CTESTCASEROOT_PROCESSENGINEKEY);
|
|
143 |
}
|
0
|
144 |
|
|
145 |
if (EKeyEscape == aKey)
|
|
146 |
{
|
|
147 |
AssertionFailed( 1, _L("Test aborted by the user <ESC>\n"));
|
|
148 |
CActiveScheduler::Stop();
|
|
149 |
}
|
|
150 |
else
|
|
151 |
{
|
|
152 |
|
|
153 |
// call virtual method here to invoke the test's overridden method
|
|
154 |
ProcessKey(aKey);
|
|
155 |
// note, we do not go ask for another, that is done by the console handler
|
|
156 |
}
|
|
157 |
}
|
|
158 |
|
|
159 |
|
|
160 |
void CTestCaseRoot::RequestCharacter()
|
|
161 |
{
|
253
|
162 |
if(gVerboseOutput)
|
|
163 |
{
|
|
164 |
OstTraceFunctionEntry0(CTESTCASEROOT_REQUESTCHARACTER);
|
|
165 |
}
|
0
|
166 |
// A request is issued to the CConsoleBase to accept a
|
|
167 |
// character from the keyboard.
|
|
168 |
|
|
169 |
__ASSERT_ALWAYS(!IsActive(), User::Panic(KMsgAlreadyActive, EPanicAlreadyActive));
|
|
170 |
|
|
171 |
iConsole->Read(iStatus);
|
|
172 |
SetActive();
|
|
173 |
iRequestedChar = ETrue;
|
|
174 |
}
|
|
175 |
|
|
176 |
|
|
177 |
void CTestCaseRoot::RunL()
|
|
178 |
{
|
253
|
179 |
if(gVerboseOutput)
|
|
180 |
{
|
|
181 |
OstTraceFunctionEntry0(CTESTCASEROOT_RUNL);
|
|
182 |
}
|
0
|
183 |
TInt complCode(iStatus.Int());
|
|
184 |
if (iRequestedChar)
|
|
185 |
{
|
|
186 |
|
|
187 |
TKeyCode k(iConsole->KeyCode());
|
|
188 |
|
|
189 |
// WARNING!
|
|
190 |
// EMULATOR QUIRK!
|
|
191 |
// When debugging if you have a breakpoint just before you read/process a key,
|
|
192 |
// the EMULATOR will read the key sent to the IDE and you get a (F5) key that
|
|
193 |
// you did not want from the IDE not the emulator.
|
|
194 |
|
|
195 |
ProcessEngineKey(k);
|
|
196 |
iRequestedChar = EFalse;
|
|
197 |
|
|
198 |
// complete so that other tasks (there are none) can run
|
|
199 |
// we will then be scheduled by the ActiveScheduler again to run the next test step.
|
|
200 |
SelfComplete();
|
|
201 |
}
|
|
202 |
else
|
|
203 |
{
|
|
204 |
// run the next test step
|
|
205 |
TInt currentStep(GetStepIndex());
|
|
206 |
PreRunStep();
|
|
207 |
LOG_VERBOSE2(_L("\n<< RunStepL() step=%d\n"), currentStep);
|
253
|
208 |
if(gVerboseOutput)
|
|
209 |
{
|
|
210 |
OstTrace1(TRACE_VERBOSE, CTESTCASEROOT_RUNL_DUP01, "\n<< RunStepL() step=%d\n", currentStep);
|
|
211 |
}
|
0
|
212 |
RunStepL();
|
|
213 |
LOG_VERBOSE3(_L(">> RunStepL() step=%d->%d\n"), currentStep, GetStepIndex());
|
253
|
214 |
if(gVerboseOutput)
|
|
215 |
{
|
|
216 |
OstTraceExt2(TRACE_VERBOSE, CTESTCASEROOT_RUNL_DUP02, ">> RunStepL() step=%d->%d\n", currentStep, GetStepIndex());
|
|
217 |
}
|
0
|
218 |
PostRunStep();
|
|
219 |
}
|
|
220 |
}
|
|
221 |
|
|
222 |
|
|
223 |
void CTestCaseRoot::PostRunStep()
|
|
224 |
{
|
|
225 |
// default impl.
|
|
226 |
}
|
|
227 |
|
|
228 |
void CTestCaseRoot::PreRunStep()
|
|
229 |
{
|
|
230 |
// default impl.
|
|
231 |
}
|
|
232 |
|
|
233 |
TInt CTestCaseRoot::RunError(TInt aError)
|
|
234 |
{
|
253
|
235 |
if(gVerboseOutput)
|
|
236 |
{
|
|
237 |
OstTraceFunctionEntry0(CTESTCASEROOT_RUNERROR);
|
|
238 |
}
|
0
|
239 |
test.Printf(_L("Test case C%lS::RunL left with %d"), &iTestCaseId, aError);
|
253
|
240 |
OstTraceExt2(TRACE_NORMAL, CTESTCASEROOT_RUNERROR_DUP01, "Test case C%lS::RunL left with %d", iTestCaseId, aError);
|
0
|
241 |
AssertionFailed(aError, _L("RunError"));
|
|
242 |
return KErrNone;
|
|
243 |
}
|
|
244 |
|
|
245 |
|
|
246 |
TDesC& CTestCaseRoot::TestCaseId()
|
|
247 |
{
|
|
248 |
return iTestCaseId;
|
|
249 |
}
|
|
250 |
|
|
251 |
|
|
252 |
TInt CTestCaseRoot::TestResult() const
|
|
253 |
{
|
|
254 |
return iTestResult;
|
|
255 |
}
|
|
256 |
|
|
257 |
|
|
258 |
void CTestCaseRoot::PerformTestL()
|
|
259 |
{
|
|
260 |
// tell user what they should have done before starting!
|
|
261 |
DescribePreconditions();
|
|
262 |
// run it
|
|
263 |
ExecuteTestCaseL();
|
|
264 |
}
|
|
265 |
|
|
266 |
|
|
267 |
void CTestCaseRoot::TestFailed(TInt aFailResult, const TDesC &aErrorDescription)
|
|
268 |
{
|
253
|
269 |
if(gVerboseOutput)
|
|
270 |
{
|
|
271 |
OstTraceFunctionEntry0(CTESTCASEROOT_TESTFAILED);
|
|
272 |
}
|
0
|
273 |
iTestResult = aFailResult;
|
|
274 |
test.Printf(_L("Test %S\n"), &TestCaseId());
|
253
|
275 |
OstTraceExt1(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED_DUP01, "Test %S\n", TestCaseId());
|
0
|
276 |
test.Printf(_L("Failed (%d)\n"), aFailResult);
|
253
|
277 |
OstTrace1(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED_DUP02, "Failed (%d)\n", aFailResult);
|
0
|
278 |
test.Printf(_L("%S!\n"), &aErrorDescription);
|
253
|
279 |
OstTraceExt1(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED_DUP03, "%S!\n", aErrorDescription);
|
0
|
280 |
if (!iAutomated)
|
|
281 |
{
|
|
282 |
test.Printf(_L("\n"));
|
253
|
283 |
OstTrace0(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED_DUP04, "\n");
|
0
|
284 |
test.Printf(KPressAnyKeyToContinue);
|
253
|
285 |
OstTrace0(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED_DUP05, KPressAnyKeyToContinue);
|
0
|
286 |
iConsole->Getch();
|
|
287 |
}
|
|
288 |
// the next call panics the framework!
|
|
289 |
TestPolicy().SignalTestComplete(iTestResult);
|
|
290 |
}
|
|
291 |
|
|
292 |
|
|
293 |
void CTestCaseRoot::TestFailed2(TInt aFailResult, const TDesC &aErrorDescription, TInt errorCode)
|
|
294 |
{
|
253
|
295 |
if(gVerboseOutput)
|
|
296 |
{
|
|
297 |
OstTraceFunctionEntry0(CTESTCASEROOT_TESTFAILED2);
|
|
298 |
}
|
0
|
299 |
iTestResult = aFailResult;
|
|
300 |
test.Printf(_L("Test %S FAILED %d '%S %d'!\n"),
|
|
301 |
&TestCaseId(),
|
|
302 |
aFailResult,
|
|
303 |
&aErrorDescription,
|
|
304 |
errorCode);
|
253
|
305 |
OstTraceExt4(TRACE_NORMAL, CTESTCASEROOT_TESTFAILED2_DUP01, "Test %S FAILED %d '%S %d'!\n",
|
|
306 |
TestCaseId(),
|
|
307 |
aFailResult,
|
|
308 |
aErrorDescription,
|
|
309 |
errorCode);
|
0
|
310 |
// the next call panics the framework!
|
|
311 |
TestPolicy().SignalTestComplete(iTestResult);
|
|
312 |
}
|
|
313 |
|
|
314 |
|
|
315 |
|
|
316 |
void CTestCaseRoot::TestPassed()
|
|
317 |
{
|
253
|
318 |
if(gVerboseOutput)
|
|
319 |
{
|
|
320 |
OstTraceFunctionEntry0(CTESTCASEROOT_TESTPASSED);
|
|
321 |
}
|
0
|
322 |
iTestResult = KErrNone;
|
|
323 |
TestPolicy().SignalTestComplete(iTestResult);
|
|
324 |
}
|
|
325 |
|
|
326 |
|
|
327 |
|
|
328 |
|
|
329 |
/** Complete the servicing of the Active object and signal it ready to run again
|
|
330 |
in next scheduler slot. This method works as drop-through when a test step has
|
|
331 |
nothing more to do .
|
|
332 |
*/
|
|
333 |
void CTestCaseRoot::SelfComplete(TInt aCode)
|
|
334 |
{
|
|
335 |
TRequestStatus* s = &iStatus;
|
|
336 |
iStatus = KRequestPending;
|
|
337 |
User::RequestComplete(s, aCode);
|
|
338 |
SetActive();
|
|
339 |
}
|
|
340 |
|
|
341 |
/* Prints a little banner at the top of a test-step :
|
|
342 |
* B2B tests also display the duration of the last step, and the current OTG state
|
|
343 |
*/
|
|
344 |
void CTestCaseRoot::PrintStepName(const TDesC &aStepName)
|
|
345 |
{
|
|
346 |
if (gVerboseOutput)
|
|
347 |
{
|
|
348 |
test.Printf(_L("--------------\n %S "), &aStepName);
|
253
|
349 |
OstTraceExt1(TRACE_NORMAL, CTESTCASEROOT_PRINTSTEPNAME, "--------------\n %S ", aStepName);
|
0
|
350 |
// B2B class method dumps the engine state
|
|
351 |
//
|
|
352 |
test.Printf(_L("\n--------------\n"));
|
253
|
353 |
OstTrace0(TRACE_NORMAL, CTESTCASEROOT_PRINTSTEPNAME_DUP01, "\n--------------\n");
|
0
|
354 |
}
|
|
355 |
}
|
|
356 |
|
|
357 |
|
|
358 |
/* **************************************************************************************
|
|
359 |
*
|
|
360 |
*/
|
|
361 |
CTestCaseB2BRoot::CTestCaseB2BRoot(const TDesC& aTestCaseId, TBool aHost, TRequestStatus &aStatus)
|
|
362 |
: CTestCaseRoot(aTestCaseId, aHost) , iCollector(aStatus)
|
|
363 |
{
|
253
|
364 |
if(gVerboseOutput)
|
|
365 |
{
|
|
366 |
OstTraceFunctionEntry0(CTESTCASEB2BROOT_CTESTCASEB2BROOT);
|
|
367 |
}
|
0
|
368 |
|
|
369 |
}
|
|
370 |
|
|
371 |
|
|
372 |
CTestCaseB2BRoot::~CTestCaseB2BRoot()
|
|
373 |
{
|
253
|
374 |
if(gVerboseOutput)
|
|
375 |
{
|
|
376 |
OstTraceFunctionEntry0(CTESTCASEB2BROOT_DCTESTCASEB2BROOT);
|
|
377 |
}
|
0
|
378 |
|
|
379 |
}
|
|
380 |
|
|
381 |
/* Print step name : B2B override displays the OTG Engine state as well
|
|
382 |
*/
|
|
383 |
void CTestCaseB2BRoot::PrintStepName(const TDesC &aStepName)
|
|
384 |
{
|
|
385 |
if (gVerboseOutput)
|
|
386 |
{
|
|
387 |
test.Printf(_L("--------------\n %S "), &aStepName);
|
253
|
388 |
OstTraceExt1(TRACE_NORMAL, CTESTCASEB2BROOT_PRINTSTEPNAME, "--------------\n %S ", aStepName);
|
0
|
389 |
// engine state
|
|
390 |
CNotifyWatcherBase *pWatcher = iCollector.GetWatcher(EWatcherState);
|
|
391 |
if (pWatcher)
|
|
392 |
{
|
|
393 |
TBuf<MAX_DSTRLEN> aDescription;
|
|
394 |
RUsbOtgDriver::TOtgState aState = static_cast<RUsbOtgDriver::TOtgState>(pWatcher->GetEventValue());
|
|
395 |
|
|
396 |
OtgStateString(aState, aDescription);
|
|
397 |
LOG_VERBOSE3(_L("OTGState %d '%S' \n"), aState, &aDescription);
|
253
|
398 |
if(gVerboseOutput)
|
|
399 |
{
|
|
400 |
OstTraceExt2(TRACE_VERBOSE, CTESTCASEB2BROOT_PRINTSTEPNAME_DUP01, "OTGState %d '%S' \n", aState, aDescription);
|
|
401 |
}
|
0
|
402 |
}
|
|
403 |
test.Printf(_L(" : time = %dms\n--------------\n"), iCollector.DurationElapsed());
|
253
|
404 |
OstTrace1(TRACE_NORMAL, CTESTCASEB2BROOT_PRINTSTEPNAME_DUP02, " : time = %dms\n--------------\n", iCollector.DurationElapsed());
|
0
|
405 |
}
|
|
406 |
}
|
|
407 |
|
|
408 |
/* Default implementation which describes this as a B2B test-case
|
|
409 |
*/
|
|
410 |
void CTestCaseB2BRoot::DescribePreconditions()
|
|
411 |
{
|
|
412 |
test.Printf(KTestTypeB2BMsg); // B2B
|
253
|
413 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_DESCRIBEPRECONDITIONS, KTestTypeB2BMsg); // B2B
|
0
|
414 |
if (gTestRoleMaster)
|
253
|
415 |
{
|
0
|
416 |
test.Printf(KRoleMasterMsg);
|
253
|
417 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_DESCRIBEPRECONDITIONS_DUP01, KRoleMasterMsg);
|
|
418 |
}
|
0
|
419 |
else
|
253
|
420 |
{
|
0
|
421 |
test.Printf(KRoleSlaveMsg);
|
253
|
422 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_DESCRIBEPRECONDITIONS_DUP02, KRoleSlaveMsg);
|
|
423 |
}
|
0
|
424 |
}
|
|
425 |
|
|
426 |
|
|
427 |
void CTestCaseB2BRoot::StepB2BPreconditions()
|
|
428 |
{
|
|
429 |
// prompt to insert connector
|
|
430 |
if (gTestRoleMaster)
|
|
431 |
{ // "B" device
|
|
432 |
test.Printf(KInsertBCablePrompt);
|
253
|
433 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_STEPB2BPRECONDITIONS, KInsertBCablePrompt);
|
0
|
434 |
}
|
|
435 |
else
|
|
436 |
{
|
|
437 |
test.Printf(KInsertACablePrompt);
|
253
|
438 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_STEPB2BPRECONDITIONS_DUP01, KInsertACablePrompt);
|
0
|
439 |
}
|
|
440 |
if (iAutomated)
|
|
441 |
{
|
|
442 |
|
|
443 |
SelfComplete();
|
|
444 |
return;
|
|
445 |
}
|
|
446 |
test.Printf(KPressAnyKeyToContinue);
|
253
|
447 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_STEPB2BPRECONDITIONS_DUP02, KPressAnyKeyToContinue);
|
0
|
448 |
RequestCharacter();
|
|
449 |
}
|
|
450 |
|
|
451 |
|
|
452 |
/* Test for A or B plug as relevant for MASTER/SLAVE role, fail the test if wrong
|
|
453 |
*/
|
|
454 |
void CTestCaseB2BRoot::CheckRoleConnections()
|
|
455 |
{
|
|
456 |
if (gTestRoleMaster)
|
|
457 |
{
|
|
458 |
if (otgIdPinPresent())
|
|
459 |
{ // oops
|
|
460 |
test.Printf(KMsgErrorPreconditionFailed);
|
253
|
461 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_CHECKROLECONNECTIONS, KMsgErrorPreconditionFailed);
|
0
|
462 |
return TestFailed(KErrAbort, KMsgBPlugNotFound);
|
|
463 |
}
|
|
464 |
}
|
|
465 |
else
|
|
466 |
{
|
|
467 |
if (!otgIdPinPresent())
|
|
468 |
{ // oops
|
|
469 |
test.Printf(KMsgErrorPreconditionFailed);
|
253
|
470 |
OstTrace0(TRACE_NORMAL, CTESTCASEB2BROOT_CHECKROLECONNECTIONS_DUP01, KMsgErrorPreconditionFailed);
|
0
|
471 |
return TestFailed(KErrAbort, KMsgAPlugNotFound);
|
|
472 |
}
|
|
473 |
}
|
|
474 |
}
|
|
475 |
|
|
476 |
|
|
477 |
/* Clears the expected event Q just before calling the step, but not the
|
|
478 |
* recieved Q since the step may still inspect it using the EventReceivedAlready() method.
|
|
479 |
*/
|
|
480 |
void CTestCaseB2BRoot::PreRunStep()
|
|
481 |
{
|
253
|
482 |
if(gVerboseOutput)
|
|
483 |
{
|
|
484 |
OstTraceFunctionEntry0(CTESTCASEB2BROOT_PRERUNSTEP);
|
|
485 |
}
|
0
|
486 |
|
|
487 |
iCollector.ClearAllEvents(EFalse, ETrue);
|
|
488 |
}
|
|
489 |
|
|
490 |
|
|
491 |
void CTestCaseB2BRoot::PostRunStep()
|
|
492 |
{
|
253
|
493 |
if(gVerboseOutput)
|
|
494 |
{
|
|
495 |
OstTraceFunctionEntry0(CTESTCASEB2BROOT_POSTRUNSTEP);
|
|
496 |
}
|
0
|
497 |
// clear the recieved event Q, but not the expected Q
|
|
498 |
iCollector.ClearAllEvents(ETrue, EFalse);
|
|
499 |
|
|
500 |
}
|
|
501 |
|
|
502 |
|
|
503 |
|