1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains STIFUnit module implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 /******************************************************************************/ |
|
19 /* |
|
20 * |
|
21 * Test module configuration |
|
22 */ |
|
23 |
|
24 // Version |
|
25 #define TEST_MODULE_VERSION_MAJOR 0 |
|
26 #define TEST_MODULE_VERSION_MINOR 0 |
|
27 #define TEST_MODULE_VERSION_BUILD 0 |
|
28 |
|
29 // Uncomment following defines, if you want to provide implementation |
|
30 // of enlisted virtual methods of test module. |
|
31 // Implementation part is located at the end of this file. |
|
32 //#define STIFUNIT_OOMTESTQUERYL |
|
33 //#define STIFUNIT_OOMTESTINITIALIZEL |
|
34 //#define STIFUNIT_OOMHANDLEWARNINGL |
|
35 //#define STIFUNIT_OOMTESTFINALIZEL |
|
36 // Uncomment following define, if you want to increase heap or stack size. |
|
37 // #define STIFUNIT_SETHEAPANDSTACKSIZE |
|
38 /******************************************************************************/ |
|
39 |
|
40 |
|
41 /* |
|
42 * Test module internals. Please do not edit them. |
|
43 */ |
|
44 |
|
45 // Includes |
|
46 #include <e32base.h> |
|
47 |
|
48 // Literals |
|
49 _LIT( KUnitLogPath, "\\logs\\testframework\\STIFUnitXXX\\" ); |
|
50 _LIT( KUnitLogFile, "STIFUnitXXX.txt" ); |
|
51 _LIT( KLogStart, "STIFUnitXXX logging starts!" ); |
|
52 |
|
53 // Defines |
|
54 #define STIF_UNIT_TEST_CASES "../src/STIFUnitXXXCases.cpp" |
|
55 #define STIF_UNIT_MODULE_CLASS_NAME CSTIFUnitXXX |
|
56 #define STIF_UNIT_MODULE_NAME _L("STIFUnitXXX.dll") |
|
57 |
|
58 // Include STIF unit generic file |
|
59 #include <StifUnitGeneric.h> |
|
60 |
|
61 /* |
|
62 * Implementation of setHeapAndStack virtual methods. |
|
63 * To changes heap and stack size provide new values to iTestThreadStackSize, iTestThreadMinHeap and iTestThreadMaxHeap. |
|
64 */ |
|
65 |
|
66 #ifdef STIFUNIT_SETHEAPANDSTACKSIZE |
|
67 EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam, |
|
68 TUint32& aParameterValid ) |
|
69 { |
|
70 aParameterValid = KStifTestModuleParameterChanged; |
|
71 CTestModuleParamVer01* param = CTestModuleParamVer01::NewL(); |
|
72 // Stack size |
|
73 param->iTestThreadStackSize= 16384; // 16K stack |
|
74 // Heap sizes |
|
75 param->iTestThreadMinHeap = 4096; // 4K heap min |
|
76 param->iTestThreadMaxHeap = 1048576;// 1M heap max |
|
77 |
|
78 return KErrNone; |
|
79 } |
|
80 #undef STIFUNIT_SETHEAPANDSTACKSIZE |
|
81 #endif |
|
82 |
|
83 /* |
|
84 * User implementation of OOM virtual methods. |
|
85 * Providing own implementation requires uncommenting defines at the |
|
86 * beginnig of this file. |
|
87 */ |
|
88 #ifdef STIFUNIT_OOMTESTQUERYL |
|
89 TBool CSTIFUnitXXX::OOMTestQueryL( const TFileName& /*aTestCaseFile*/, |
|
90 const TInt aCaseNumber, |
|
91 TOOMFailureType& aFailureType, |
|
92 TInt& aFirstMemFailure, |
|
93 TInt& aLastMemFailure) |
|
94 { |
|
95 } |
|
96 #undef STIFUNIT_OOMTESTQUERYL |
|
97 #endif |
|
98 |
|
99 #ifdef STIFUNIT_OOMTESTINITIALIZEL |
|
100 void CSTIFUnitXXX::OOMTestInitializeL( const TFileName& /*aTestCaseFile*/, |
|
101 const TInt /*aCaseNumber*/ ) |
|
102 { |
|
103 } |
|
104 #undef STIFUNIT_OOMTESTINITIALIZEL |
|
105 #endif |
|
106 |
|
107 #ifdef STIFUNIT_OOMHANDLEWARNINGL |
|
108 void CSTIFUnitXXX::OOMHandleWarningL( const TFileName& /*aTestCaseFile*/, |
|
109 const TInt /*aCaseNumber*/, |
|
110 TInt& /*aFailNextValue*/) |
|
111 { |
|
112 } |
|
113 #undef STIFUNIT_OOMHANDLEWARNINGL |
|
114 #endif |
|
115 |
|
116 #ifdef STIFUNIT_OOMTESTFINALIZEL |
|
117 void CSTIFUnitXXX::OOMTestFinalizeL( const TFileName& /*aTestCaseFile*/, |
|
118 const TInt /*aCaseNumber*/ ) |
|
119 { |
|
120 } |
|
121 #undef STIFUNIT_OOMTESTFINALIZEL |
|
122 #endif |
|
123 |
|
124 // End of File |
|