|
1 // Copyright (c) 2005-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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Performs the Out of Memory Tests.\n |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalComponent - Internal Symbian test code |
|
23 */ |
|
24 |
|
25 #include <f32file.h> |
|
26 #include <apaid.h> |
|
27 #include <apgaplst.h> |
|
28 #include <apgicnfl.h> |
|
29 #include <apgdoor.h> |
|
30 #include "tstapp.h" |
|
31 #include <fbs.h> |
|
32 #include <s32std.h> |
|
33 #include <s32stor.h> |
|
34 #include <s32file.h> |
|
35 #include <s32mem.h> |
|
36 #include "T_OOMStep.h" |
|
37 // |
|
38 #if !defined(__E32TEST_H__) |
|
39 #include <e32test.h> |
|
40 #endif |
|
41 |
|
42 |
|
43 void CT_OOMStep::setup() |
|
44 { |
|
45 #if defined(__EPOC32__) |
|
46 TFullName filePath=_L("c:\\docs\\tstapp.doc"); |
|
47 TFullName tempPath=_L("c:\\system\\temp\\"); |
|
48 // if we're on the rack create the directories we need |
|
49 TParse parser; |
|
50 parser.Set(filePath,NULL,NULL); |
|
51 iFs.MkDirAll(parser.DriveAndPath()); |
|
52 parser.Set(tempPath,NULL,NULL); |
|
53 iFs.MkDirAll(parser.DriveAndPath()); |
|
54 #endif |
|
55 } |
|
56 |
|
57 |
|
58 |
|
59 /** |
|
60 Auxiliary Fn for Test Case ID T-OOMStep-TestOOMConstructionL |
|
61 |
|
62 This function adds a new document to the app DLL and associates a |
|
63 temporary store. The document is then initialized with the default settings. |
|
64 */ |
|
65 CApaDocument* CT_OOMStep::CreateTestDocL(CApaProcess* aProcess) |
|
66 { |
|
67 |
|
68 TFileName dllname=_L("tstapp.app"); |
|
69 TFullName filePath=_L("c:\\docs\\tstapp.doc"); |
|
70 // create a new main doc of type tstapp |
|
71 CApaDocument* doc=NULL; |
|
72 |
|
73 TApaApplicationFactory appFact(KUidTestApp); |
|
74 doc=aProcess->AddNewDocumentL(appFact); |
|
75 |
|
76 aProcess->SetMainDocument(doc); |
|
77 // |
|
78 // create the store and initialise it |
|
79 CFileStore* store = doc->CreateFileStoreLC(aProcess->FsSession(),filePath); |
|
80 CleanupStack::Pop(); // store |
|
81 ((CTestAppDoc*)aProcess->MainDocument())->iStore = store; |
|
82 aProcess->SetMainDocFileName(filePath); |
|
83 // |
|
84 // initialise the document with factory settings |
|
85 doc->NewDocumentL(); |
|
86 // |
|
87 return doc; |
|
88 } |
|
89 |
|
90 |
|
91 /** |
|
92 Auxiliary Fn for Test Case ID T-OOMStep-TestOOMConstructionL |
|
93 |
|
94 This function creates a test document for app DLL and saves |
|
95 the document. |
|
96 |
|
97 */ |
|
98 void CT_OOMStep::CreateTestDocFileL() |
|
99 { |
|
100 |
|
101 TFullName filePath=_L("c:\\docs\\tstapp.doc"); |
|
102 // delete the file to be created by the testcode |
|
103 iFs.Delete(filePath); |
|
104 iFs.MkDir(_L("c:\\docs\\")); |
|
105 |
|
106 // create an appfinder and process |
|
107 CApaProcess* process = CApaProcess::NewL(iFs); |
|
108 CApaDocument* doc = CreateTestDocL(process); |
|
109 |
|
110 // save it |
|
111 doc->SaveL(); |
|
112 |
|
113 // tidy up |
|
114 process->DestroyDocument(doc); |
|
115 delete process; |
|
116 } |
|
117 |
|
118 /** |
|
119 @SYMTestCaseID T-OOMStep-TestOOMConstructionL |
|
120 |
|
121 @SYMPREQ |
|
122 |
|
123 @SYMTestCaseDesc Test methods CApaScanningAppFinder::NewL, CApaProcess::NewL, |
|
124 CApaProcess::AddNewDocumentL, CApaProcess::OpenNewDocumentL and CApaDocument::SaveL |
|
125 when device goes Out of Memory. |
|
126 |
|
127 @SYMTestPriority High |
|
128 |
|
129 @SYMTestStatus Implemented |
|
130 |
|
131 @SYMTestActions \n OOM Test for CApaScanningAppFinder::NewL:\n |
|
132 Use macro __UHEAP_SETFAIL() to simulate the out of memory |
|
133 situation. Call CApaScanningAppFinder::NewL() to allocate memory. Observe |
|
134 the leave that occurs. Observe after how many allocations the leave occurs.\n\n |
|
135 OOM Test for CApaProcess::NewL:\n |
|
136 Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call |
|
137 CApaProcess::NewL() to allocate memory. Observe the leave that occurs. |
|
138 Observe after how many allocations the leave occurs.\n\n |
|
139 OOM Test for CApaProcess::AddNewDocumentL:\n |
|
140 Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call |
|
141 CApaProcess::AddNewDocumentL() to allocate memory. Observe the leave that |
|
142 occurs. Observe after how many allocations the leave occurs.\n\n |
|
143 OOM Test for CApaProcess::OpenNewDocumentL:\n |
|
144 Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call |
|
145 CApaProcess::OpenNewDocumentL() to allocate memory. Observe the leave that |
|
146 occurs. Observe after how many allocations the leave occurs.\n\n |
|
147 OOM Test for CApaDocument::SaveL:\n |
|
148 Create and initialize a document for tstapp. Use macro __UHEAP_SETFAIL() |
|
149 to simulate the out of memory situation. Call CApaDocument::SaveL() to |
|
150 allocate memory for the document to be saved. Observe the leave that occurs. |
|
151 Observe after how many allocations the leave occurs.\n\n |
|
152 API Calls:\n |
|
153 CApaScanningAppFinder::NewL(const RFs& aFs)\n |
|
154 CApaProcess::NewL(const RFs& aFs,CApaAppFinder& aAppFinder)\n |
|
155 CApaProcess::AddNewDocumentL(const TDesC& aDllFileName,TUid aDllUid=KNullUid)\n |
|
156 CApaProcess::OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode)\n |
|
157 CApaDocument::SaveL()\n |
|
158 |
|
159 @SYMTestExpectedResults Tests should complete without any memory leaks. It should |
|
160 also observe the no of allocations which occur before OOM situation. |
|
161 |
|
162 */ |
|
163 void CT_OOMStep::TestOOMConstructionL() |
|
164 { |
|
165 TInt failRate=0; |
|
166 TFullName filePath=_L("c:\\docs\\tstapp.doc"); |
|
167 |
|
168 __UHEAP_RESET; |
|
169 |
|
170 // CApaProcess |
|
171 INFO_PRINTF1(_L("CApaProcess construction under OOM")); |
|
172 CApaProcess* process=NULL; |
|
173 for (failRate=1;;failRate++) |
|
174 { |
|
175 __UHEAP_RESET; |
|
176 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
177 __UHEAP_MARK; |
|
178 |
|
179 TRAPD(ret, process = CApaProcess::NewL(iFs)); |
|
180 |
|
181 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
182 if (ret!=KErrNone) |
|
183 { |
|
184 __UHEAP_MARKEND; |
|
185 TEST(process==NULL); |
|
186 } |
|
187 else |
|
188 { |
|
189 TEST(process!=NULL); |
|
190 delete process; |
|
191 process = NULL; |
|
192 REComSession::FinalClose(); |
|
193 __UHEAP_MARKEND; |
|
194 break; |
|
195 } |
|
196 } |
|
197 __UHEAP_RESET; |
|
198 INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); |
|
199 // |
|
200 // creating CApaDocument |
|
201 INFO_PRINTF1(_L("CApaDocument construction under OOM")); |
|
202 CApaDocument* doc=NULL; |
|
203 // |
|
204 for (failRate=1;;failRate++) |
|
205 { |
|
206 __UHEAP_RESET; |
|
207 process = CApaProcess::NewL(iFs); |
|
208 TEST(process!=NULL); |
|
209 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
210 __UHEAP_MARK; |
|
211 |
|
212 TApaApplicationFactory appFact(KUidTestApp); |
|
213 TRAPD(ret,doc=process->AddNewDocumentL(appFact)); |
|
214 |
|
215 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
216 if (ret!=KErrNone) |
|
217 { |
|
218 delete process; |
|
219 REComSession::FinalClose(); |
|
220 __UHEAP_MARKEND; |
|
221 TEST(doc==NULL); |
|
222 } |
|
223 else |
|
224 { |
|
225 TEST(doc!=NULL); |
|
226 process->DestroyDocument(doc); |
|
227 delete process; |
|
228 REComSession::FinalClose(); |
|
229 __UHEAP_MARKEND; |
|
230 break; |
|
231 } |
|
232 } |
|
233 __UHEAP_RESET; |
|
234 INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); |
|
235 // |
|
236 // opening a CApaDocument |
|
237 INFO_PRINTF1(_L("CApaDocument Restoration under OOM")); |
|
238 TRAPD(err,CreateTestDocFileL()); |
|
239 TEST(err==KErrNone); |
|
240 // |
|
241 for (failRate=1;;failRate++) |
|
242 { |
|
243 __UHEAP_RESET; |
|
244 doc = NULL; |
|
245 process = CApaProcess::NewL(iFs); |
|
246 |
|
247 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
248 __UHEAP_MARK; |
|
249 CFileStore* store=NULL; |
|
250 CStreamDictionary* streamDic=NULL; |
|
251 TRAPD(ret, doc=process->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); |
|
252 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
253 if (ret!=KErrNone) |
|
254 { |
|
255 delete streamDic; |
|
256 delete store; |
|
257 delete process; |
|
258 REComSession::FinalClose(); |
|
259 __UHEAP_MARKEND; |
|
260 TEST(doc==NULL); |
|
261 } |
|
262 else |
|
263 { |
|
264 TEST(doc!=NULL); |
|
265 TEST(streamDic!=NULL); |
|
266 TEST(store!=NULL); |
|
267 delete streamDic; |
|
268 delete store; |
|
269 process->DestroyDocument(doc); |
|
270 delete process; |
|
271 REComSession::FinalClose(); |
|
272 __UHEAP_MARKEND; |
|
273 break; |
|
274 } |
|
275 } |
|
276 __UHEAP_RESET; |
|
277 INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); |
|
278 // |
|
279 // saving a CApaDocument |
|
280 INFO_PRINTF1(_L("CApaDocument Storing under OOM")); |
|
281 // |
|
282 for (failRate=1;;failRate++) |
|
283 { |
|
284 __UHEAP_RESET; |
|
285 // delete the file to be created by the testcode |
|
286 iFs.Delete(filePath); |
|
287 process = CApaProcess::NewL(iFs); |
|
288 doc = CreateTestDocL(process); |
|
289 // attempt to save |
|
290 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
291 __UHEAP_MARK; |
|
292 TRAPD(ret, doc->SaveL()); |
|
293 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
294 if (ret!=KErrNone) |
|
295 { |
|
296 process->DestroyDocument(doc); |
|
297 delete process; |
|
298 REComSession::FinalClose(); |
|
299 __UHEAP_MARKEND; |
|
300 } |
|
301 else |
|
302 { |
|
303 process->DestroyDocument(doc); |
|
304 delete process; |
|
305 REComSession::FinalClose(); |
|
306 __UHEAP_MARKEND; |
|
307 break; |
|
308 } |
|
309 } |
|
310 __UHEAP_RESET; |
|
311 INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); |
|
312 // |
|
313 } |
|
314 |
|
315 /** |
|
316 @SYMTestCaseID T-OOMStep-TestDoorOOML |
|
317 |
|
318 @SYMPREQ |
|
319 |
|
320 @SYMTestCaseDesc Test CApaDoor APIs NewL(), StoreL(), Restore() when device |
|
321 goes Out of Memory. |
|
322 |
|
323 @SYMTestPriority High |
|
324 |
|
325 @SYMTestStatus Implemented |
|
326 |
|
327 @SYMTestActions The method simulates an OOM scenario to test CApaDoor APIs NewL(), |
|
328 StoreL() and Restore().\n\n |
|
329 To test CApaDoor::NewL(), the method creates a process and adds a new document |
|
330 to app DLL using AddNewDocumentL(). Using the macro __UHEAP_SETFAIL() OOM |
|
331 scenario is simulated. Call CApaDoor::NewL() to observe the leave returned.\n\n |
|
332 To test CApaDoor::StoreL(), the method creates a process and adds a new |
|
333 document to app DLL using AddNewDocumentL(). It calls CApaDoor::NewL() to |
|
334 create a wrapper for the document. A temporary buffer store is created. |
|
335 Now Use macro __UHEAP_SETFAIL() to simulate the OOM scenario. |
|
336 Call CApaDoor::StoreL() to store the document in the specified store. |
|
337 Observe the leave returned.\n\n |
|
338 To test CApaDoor::Restore(), the method creates a process and adds a new |
|
339 document to app DLL using AddNewDocumentL(). It calls CApaDoor::NewL() |
|
340 to create a wrapper for the document. A temporary buffer store is created. |
|
341 Now Call CApaDoor::StoreL() to store the document in the specified store. |
|
342 Use macro __UHEAP_SETFAIL() to simulate the OOM scenario. Call |
|
343 CApaDoor::RestoreL() to restore the document from the specified store. |
|
344 Observe the leave returned.\n |
|
345 API Calls:\n |
|
346 CApaDoor::NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips)\n |
|
347 CApaDoor::StoreL(CStreamStore& aStore) const\n |
|
348 CApaDoor::RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId)\n |
|
349 |
|
350 @SYMTestExpectedResults Tests should complete without any memory leaks. |
|
351 |
|
352 */ |
|
353 void CT_OOMStep::TestDoorOOML() |
|
354 { |
|
355 CApaProcess* process=NULL; |
|
356 CApaDocument* doc=NULL; |
|
357 CApaDoor* door=NULL; |
|
358 TInt failRate=0; |
|
359 // |
|
360 INFO_PRINTF1(_L("CApaDoor construction under OOM")); |
|
361 // |
|
362 __UHEAP_MARK; |
|
363 //Create a session with F & B server |
|
364 TInt ret=RFbsSession::Connect(); |
|
365 TEST(!ret); |
|
366 |
|
367 for (failRate=1;;failRate++) |
|
368 { |
|
369 __UHEAP_RESET; |
|
370 door = NULL; |
|
371 process = CApaProcess::NewL(iFs); |
|
372 TApaApplicationFactory appFact(KUidTestApp); |
|
373 doc=process->AddNewDocumentL(appFact); |
|
374 |
|
375 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
376 |
|
377 door = NULL; |
|
378 TRAPD(ret,door=CApaDoor::NewL(iFs,*doc,TSize(400,400))); |
|
379 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
380 if (ret!=KErrNone) |
|
381 { |
|
382 delete process; |
|
383 TEST(door==NULL); |
|
384 } |
|
385 else |
|
386 { |
|
387 TEST(door!=NULL); |
|
388 delete door; |
|
389 |
|
390 delete process; |
|
391 break; |
|
392 } |
|
393 } |
|
394 __UHEAP_RESET; |
|
395 INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); |
|
396 // |
|
397 INFO_PRINTF1(_L("CApaDoor Store() under OOM")); |
|
398 // |
|
399 CBufStore* store=NULL; |
|
400 for (failRate=1;;failRate++) |
|
401 { |
|
402 __UHEAP_RESET; |
|
403 door = NULL; |
|
404 process = CApaProcess::NewL(iFs); |
|
405 TApaApplicationFactory appFact(KUidTestApp); |
|
406 doc=process->AddNewDocumentL(appFact); |
|
407 |
|
408 door = CApaDoor::NewL(iFs,*doc,TSize(400,400)); // owns doc |
|
409 store = CBufStore::NewL(10); |
|
410 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
411 |
|
412 TStreamId id=KNullStreamId; |
|
413 TRAPD(ret,id=door->StoreL(*store)); |
|
414 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
415 if (ret!=KErrNone) |
|
416 { |
|
417 TEST(id==KNullStreamId); |
|
418 delete store; |
|
419 delete door; |
|
420 |
|
421 delete process; |
|
422 } |
|
423 else |
|
424 { |
|
425 TEST(id!=KNullStreamId); |
|
426 delete store; |
|
427 |
|
428 delete door; |
|
429 delete process; |
|
430 break; |
|
431 } |
|
432 } |
|
433 __UHEAP_RESET; |
|
434 INFO_PRINTF2(_L(" #allocs: %d\n"),failRate-1); |
|
435 // |
|
436 INFO_PRINTF1(_L("CApaDoor Restore() under OOM")); |
|
437 // |
|
438 for (failRate=1;;failRate++) |
|
439 { |
|
440 __UHEAP_RESET; |
|
441 door = NULL; |
|
442 process = CApaProcess::NewL(iFs); |
|
443 TApaApplicationFactory appFact(KUidTestApp); |
|
444 doc = process->AddNewDocumentL(appFact); |
|
445 door = CApaDoor::NewL(iFs,*doc,TSize(400,400)); // owns doc |
|
446 store = CBufStore::NewL(10); |
|
447 TStreamId id = door->StoreL(*store); |
|
448 __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); |
|
449 |
|
450 TRAPD(ret,door->RestoreL(*store,id)); |
|
451 TEST((ret==KErrNone || ret==KErrNoMemory)); |
|
452 if (ret!=KErrNone) |
|
453 { |
|
454 delete store; |
|
455 delete door; |
|
456 |
|
457 delete process; |
|
458 } |
|
459 else |
|
460 { |
|
461 delete store; |
|
462 delete door; |
|
463 |
|
464 delete process; |
|
465 break; |
|
466 } |
|
467 } |
|
468 __UHEAP_RESET; |
|
469 INFO_PRINTF2(_L(" #allocs: %d\n"),failRate-1); |
|
470 // |
|
471 //Close the session F & B server. |
|
472 RFbsSession::Disconnect(); |
|
473 REComSession::FinalClose(); |
|
474 __UHEAP_MARKEND; |
|
475 } |
|
476 |
|
477 |
|
478 /** |
|
479 Auxiliary Fn for all Test Cases. |
|
480 |
|
481 This method creates and installs an active scheduler and puts the |
|
482 test code on the scheduler as a CIdle object. The method initiates |
|
483 all tests by calling the static method CT-OOMStepCallBack::CallBack(). |
|
484 |
|
485 */ |
|
486 void CT_OOMStep::DoTestsInCallBackL() |
|
487 { |
|
488 // create an active scheduler |
|
489 CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; |
|
490 CActiveScheduler::Install(scheduler); |
|
491 CleanupStack::PushL(scheduler); |
|
492 |
|
493 // put the test code onto the scheduler as an idle object |
|
494 CIdle* idle=CIdle::NewL(-20); |
|
495 CleanupStack::PushL(idle); |
|
496 |
|
497 CT_OOMStepCallBack* callBack = new(ELeave) CT_OOMStepCallBack(this); |
|
498 CleanupStack::PushL(callBack); |
|
499 |
|
500 idle->Start(TCallBack(CT_OOMStepCallBack::CallBack,callBack)); |
|
501 // start the test code |
|
502 CActiveScheduler::Start(); |
|
503 |
|
504 // all outstanding requests complete - kill the scheduler |
|
505 CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle |
|
506 } |
|
507 |
|
508 |
|
509 |
|
510 CT_OOMStepCallBack::CT_OOMStepCallBack(CT_OOMStep* aTestStep) |
|
511 { |
|
512 iTestStep = aTestStep; |
|
513 } |
|
514 |
|
515 |
|
516 CT_OOMStepCallBack::~CT_OOMStepCallBack() |
|
517 { |
|
518 |
|
519 } |
|
520 /** |
|
521 Auxiliary Fn for all Test Cases. |
|
522 |
|
523 The method initiates all tests to be performed. |
|
524 |
|
525 */ |
|
526 void CT_OOMStep::DoStepTests() |
|
527 { |
|
528 __UHEAP_MARK; |
|
529 |
|
530 INFO_PRINTF1(_L("About to test OOM resilience")); |
|
531 TRAPD(r,TestOOMConstructionL()); |
|
532 TEST(r==KErrNone); |
|
533 __UHEAP_MARKEND; |
|
534 |
|
535 __UHEAP_MARK; |
|
536 INFO_PRINTF1(_L("About to test door OOM resilience")); |
|
537 TRAP(r,TestDoorOOML()); |
|
538 TEST(r==KErrNone); |
|
539 __UHEAP_MARKEND; |
|
540 } |
|
541 |
|
542 TInt CT_OOMStepCallBack::CallBack(TAny* callBack/*aThis*/) |
|
543 /** |
|
544 This static method is the callback function of CIdle object. The method |
|
545 calls the non-static method DoStepTests() which initiates all the tests. |
|
546 */ |
|
547 { |
|
548 |
|
549 //Do Tests. |
|
550 ((CT_OOMStepCallBack *)callBack)->iTestStep->DoStepTests(); |
|
551 |
|
552 CActiveScheduler::Stop(); |
|
553 return EFalse; // don't call back again |
|
554 } |
|
555 |
|
556 |
|
557 |
|
558 |
|
559 CT_OOMStep::~CT_OOMStep() |
|
560 /** |
|
561 Destructor |
|
562 */ |
|
563 { |
|
564 } |
|
565 |
|
566 CT_OOMStep::CT_OOMStep() |
|
567 /** |
|
568 Constructor |
|
569 */ |
|
570 { |
|
571 // Call base class method to set up the human readable name for logging |
|
572 SetTestStepName(KT_OOMStep); |
|
573 } |
|
574 |
|
575 TVerdict CT_OOMStep::doTestStepPreambleL() |
|
576 /** |
|
577 @return - TVerdict code |
|
578 Override of base class virtual |
|
579 */ |
|
580 { |
|
581 SetTestStepResult(EPass); |
|
582 return TestStepResult(); |
|
583 } |
|
584 |
|
585 TVerdict CT_OOMStep::doTestStepPostambleL() |
|
586 /** |
|
587 @return - TVerdict code |
|
588 Override of base class virtual |
|
589 */ |
|
590 { |
|
591 return TestStepResult(); |
|
592 } |
|
593 |
|
594 TVerdict CT_OOMStep::doTestStepL() |
|
595 /** |
|
596 @return - TVerdict code |
|
597 Override of base class virtual |
|
598 */ |
|
599 { |
|
600 INFO_PRINTF1(_L("Testing Apparch...OOM tests")); |
|
601 // |
|
602 // set up an fbs |
|
603 FbsStartup(); |
|
604 // |
|
605 // set up the directory structure |
|
606 iFs.Connect(); |
|
607 setup(); |
|
608 // |
|
609 // run the testcode |
|
610 |
|
611 TRAPD(ret,DoTestsInCallBackL()) |
|
612 TEST(ret==KErrNone); |
|
613 |
|
614 iFs.Close(); |
|
615 return TestStepResult(); |
|
616 } |