|
1 // Copyright (c) 2002-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 // Contains MBufMgr Test Step 01 to Create & destroy RMBufManager |
|
15 // |
|
16 // |
|
17 |
|
18 // EPOC includes |
|
19 #include <e32base.h> |
|
20 |
|
21 // Test system includes |
|
22 #include <networking/log.h> |
|
23 #include <networking/teststep.h> |
|
24 #include "TestStepCTMbufmgr.h" |
|
25 #include "TestSuiteCTMbufmgr.h" |
|
26 |
|
27 #include "Test01CreateDeleteMBufMgr.h" |
|
28 |
|
29 |
|
30 // constructor |
|
31 CTest01CreateDeleteMBufMgr::CTest01CreateDeleteMBufMgr() |
|
32 { |
|
33 iTestStepName = _L("MBufMgrTest01");// Store the name of this test case |
|
34 } |
|
35 |
|
36 // destructor |
|
37 CTest01CreateDeleteMBufMgr::~CTest01CreateDeleteMBufMgr() |
|
38 { |
|
39 } |
|
40 |
|
41 // |
|
42 enum TVerdict CTest01CreateDeleteMBufMgr::doTestStepL(void) |
|
43 { |
|
44 __UHEAP_MARK; |
|
45 |
|
46 #ifdef __CFLOG_ACTIVE |
|
47 __CFLOG_CREATEL; |
|
48 __CFLOG_OPEN; |
|
49 #endif |
|
50 //-------------- substep 1 -------------------- |
|
51 Log(_L(" 01 Create CMBufManager and install active scheduler:")); |
|
52 CleanupStack::PushL( iActSch = new(ELeave) CActiveScheduler ); |
|
53 CActiveScheduler::Install(iActSch); |
|
54 CleanupStack::PushL(CreateInstanceMBufMgrL(KMBufDefaultHeapSize)); |
|
55 |
|
56 //-------------- substep 2 -------------------- |
|
57 Log(_L(" 02 Clean up stack:")); |
|
58 CleanupStack::PopAndDestroy(iMBMngr); |
|
59 CActiveScheduler::Install(NULL); |
|
60 CleanupStack::PopAndDestroy(iActSch); |
|
61 |
|
62 #ifdef __CFLOG_ACTIVE |
|
63 __CFLOG_CLOSE; |
|
64 __CFLOG_DELETE; |
|
65 #endif |
|
66 |
|
67 __UHEAP_MARKEND; |
|
68 return EPass; |
|
69 } |
|
70 |