|
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 #ifdef SYMBIAN_OLD_EXPORT_LOCATION |
|
23 #include "networking/log.h" |
|
24 #include "networking/teststep.h" |
|
25 #else |
|
26 #include <networking/log.h> |
|
27 #include <networking/teststep.h> |
|
28 #endif |
|
29 #include "TestStepCTMbufmgr.h" |
|
30 #include "TestSuiteCTMbufmgr.h" |
|
31 |
|
32 #include "Test01CreateDeleteMBufMgr.h" |
|
33 #include <comms-infras/commsbufpond.h> |
|
34 |
|
35 // constructor |
|
36 CTest01CreateDeleteMBufMgr::CTest01CreateDeleteMBufMgr() |
|
37 { |
|
38 iTestStepName = _L("MBufMgrTest01");// Store the name of this test case |
|
39 } |
|
40 |
|
41 // destructor |
|
42 CTest01CreateDeleteMBufMgr::~CTest01CreateDeleteMBufMgr() |
|
43 { |
|
44 } |
|
45 |
|
46 // |
|
47 enum TVerdict CTest01CreateDeleteMBufMgr::doTestStepL(void) |
|
48 { |
|
49 __UHEAP_MARK; |
|
50 |
|
51 #ifdef __CFLOG_ACTIVE |
|
52 __CFLOG_CREATEL; |
|
53 __CFLOG_OPEN; |
|
54 #endif |
|
55 //-------------- substep 1 -------------------- |
|
56 Log(_L(" 01 Create CMBufManager and install active scheduler:")); |
|
57 CleanupStack::PushL( iActSch = new(ELeave) CActiveScheduler ); |
|
58 CActiveScheduler::Install(iActSch); |
|
59 CreateInstanceMBufMgrL(KMBufDefaultHeapSize); |
|
60 |
|
61 //-------------- substep 2 -------------------- |
|
62 Log(_L(" 02 Clean up stack:")); |
|
63 iBufPond.Close(); |
|
64 CActiveScheduler::Install(NULL); |
|
65 CleanupStack::PopAndDestroy(iActSch); |
|
66 |
|
67 #ifdef __CFLOG_ACTIVE |
|
68 __CFLOG_CLOSE; |
|
69 __CFLOG_DELETE; |
|
70 #endif |
|
71 |
|
72 __UHEAP_MARKEND; |
|
73 return EPass; |
|
74 } |
|
75 |