|
1 // Copyright (c) 2001-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 definition of CTestStepCTMbufmgr which is the base class |
|
15 // for all the Mbufmgr Test Step classes |
|
16 // |
|
17 |
|
18 #include <networking/log.h> |
|
19 #include <networking/teststep.h> |
|
20 #include "TestStepCTMbufmgr.h" |
|
21 #include <networking/testsuite.h> |
|
22 #include "TestSuiteCTMbufmgr.h" |
|
23 |
|
24 #include "Test01CreateDeleteMBufMgr.h" |
|
25 #include "Test02AllocDealloc.h" |
|
26 #include "Test03AllocLeave.h" |
|
27 #include "Test04CopyInOut.h" |
|
28 #include "Test05CopyInOutOffset.h" |
|
29 #include "Test06SplitL.h" |
|
30 #include "Test07TrimStart.h" |
|
31 #include "Test08TrimEnd.h" |
|
32 #include "Test09Align.h" |
|
33 #include "Test10CopyL.h" |
|
34 #include "Test11AsyncAlloc.h" |
|
35 #include "Test12General.h" |
|
36 #include "Test13Performance.h" |
|
37 #include "Test14HeapFreeCheck.h" |
|
38 #include "Test15Concurrency.h" |
|
39 #include "test16memoryfull.h" |
|
40 #include "test17requestsizelimits.h" |
|
41 #include "test18exhaustmidsizepools.h" |
|
42 #include "test19prepend.h" |
|
43 #include "Test20Alloc.h" |
|
44 |
|
45 EXPORT_C CTestSuiteCTMbufmgr* NewTestSuiteCTMbufmgr( void ) |
|
46 { |
|
47 return new (ELeave) CTestSuiteCTMbufmgr; |
|
48 } |
|
49 |
|
50 CTestSuiteCTMbufmgr::~CTestSuiteCTMbufmgr() |
|
51 { |
|
52 } |
|
53 |
|
54 // Add a test step into the suite |
|
55 void CTestSuiteCTMbufmgr::AddTestStepL( CTestStepCTMbufmgr* ptrTestStep ) |
|
56 { |
|
57 // Test steps contain a pointer back to the suite which owns them |
|
58 ptrTestStep->iEsockSuite = this; |
|
59 |
|
60 // Add the step using the base class method |
|
61 CTestSuite::AddTestStepL(ptrTestStep); |
|
62 } |
|
63 |
|
64 |
|
65 // Make a version string available for test system |
|
66 TPtrC CTestSuiteCTMbufmgr::GetVersion( void ) |
|
67 { |
|
68 #ifdef _DEBUG |
|
69 _LIT(KTxtVersion,"1.007 (udeb)"); |
|
70 #else |
|
71 _LIT(KTxtVersion,"1.007"); |
|
72 #endif |
|
73 |
|
74 return KTxtVersion(); |
|
75 } |
|
76 |
|
77 // Second phase constructor for MBufMgr test suite |
|
78 // This creates all the MBufMgr test steps and |
|
79 // stores them inside CTestSuiteCTMbufmgr |
|
80 void CTestSuiteCTMbufmgr::InitialiseL( void ) |
|
81 { |
|
82 |
|
83 // Add test steps |
|
84 AddTestStepL( new(ELeave) CTest01CreateDeleteMBufMgr ); |
|
85 AddTestStepL( new(ELeave) CTest02AllocDealloc ); |
|
86 AddTestStepL( new(ELeave) CTest03AllocLeave ); |
|
87 AddTestStepL( new(ELeave) CTest04CopyInOut ); |
|
88 AddTestStepL( new(ELeave) CTest05CopyInOutOffset ); |
|
89 AddTestStepL( new(ELeave) CTest06Split ); |
|
90 AddTestStepL( new(ELeave) CTest07TrimStart ); |
|
91 AddTestStepL( new(ELeave) CTest08TrimEnd ); |
|
92 AddTestStepL( new(ELeave) CTest09Align ); |
|
93 AddTestStepL( new(ELeave) CTest10Copy ); |
|
94 AddTestStepL( new(ELeave) CTest11AsyncAlloc ); |
|
95 AddTestStepL( new(ELeave) CTest12General ); |
|
96 AddTestStepL( new(ELeave) CTest13Performance ); |
|
97 AddTestStepL( new(ELeave) CTest14HeapFreeCheck ); |
|
98 AddTestStepL( new(ELeave) CTest15Concurrency ); |
|
99 AddTestStepL( new(ELeave) CTest16MemoryFull ); |
|
100 AddTestStepL( new(ELeave) CTest17RequestSizeLimits ); |
|
101 AddTestStepL( new(ELeave) CTest18ExhaustMidSizePools ); |
|
102 AddTestStepL( new(ELeave) CTest19Prepend ); |
|
103 AddTestStepL( new(ELeave) CTest20Alloc ); |
|
104 |
|
105 return; |
|
106 } |
|
107 |