First public contribution.
1 // Copyright (c) 1997-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The unit test class implementations for the RStringPool class.
19 #pragma warning(disable : 4097) // disable typedef warning
22 #include "StringPoolUnitTest.h"
26 // ______________________________________________________________________________
28 _LIT(KStringPoolCaseInsensitiveUnitTest,"CStringPool_CaseInsensitive_UnitTest");
30 CStringPool_CaseInsensitive_UnitTest* CStringPool_CaseInsensitive_UnitTest::NewL(CDataLogger& aDataLogger,
31 MUnitTestObserver& aObserver)
33 CStringPool_CaseInsensitive_UnitTest* self =
34 new(ELeave) CStringPool_CaseInsensitive_UnitTest(aDataLogger,
36 CleanupStack::PushL(self);
42 inline TInt CStringPool_CaseInsensitive_UnitTest::RunError(TInt aError)
44 // The RunL left so chain to the base first and then cleanup
45 TInt error = CUnitTest::RunError(aError); // Chain to base
47 delete iStateAccessor;
48 delete iTrueValidator;
49 delete iFalseValidator;
53 inline CStringPool_CaseInsensitive_UnitTest::~CStringPool_CaseInsensitive_UnitTest()
55 // Simply delete our test class instance
57 delete iStateAccessor;
58 delete iTrueValidator;
59 delete iFalseValidator;
62 inline CStringPool_CaseInsensitive_UnitTest::CStringPool_CaseInsensitive_UnitTest(CDataLogger& aDataLogger,
63 MUnitTestObserver& aObserver)
64 : CUnitTest(KStringPoolCaseInsensitiveUnitTest, aDataLogger, aObserver)
69 // Now the Individual transitions need to be added.
70 inline void CStringPool_CaseInsensitive_UnitTest::ConstructL()
72 // Perform the base class initialization
75 // Create the Unit test state accessor
76 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
77 // Construct the Unit test context.
78 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
79 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
80 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
81 AddTransitionL(new(ELeave)CStringPool_NewL_Transition(*iUTContext,*iFalseValidator));
82 AddTransitionL(new(ELeave)CStringPool_FAeqA_Transition(*iUTContext,*iTrueValidator));
83 AddTransitionL(new(ELeave)CStringPool_FAneA_Transition(*iUTContext,*iFalseValidator));
84 AddTransitionL(new(ELeave)CStringPool_FAneB_Transition(*iUTContext,*iTrueValidator));
85 AddTransitionL(new(ELeave)CStringPool_FAeqB_Transition(*iUTContext,*iFalseValidator));
86 AddTransitionL(new(ELeave)CStringPool_FAeqD_Transition(*iUTContext,*iTrueValidator));
87 AddTransitionL(new(ELeave)CStringPool_FAneD_Transition(*iUTContext,*iFalseValidator));
88 AddTransitionL(new(ELeave)CStringPool_FDesc_Transition(*iUTContext,*iFalseValidator));
89 AddTransitionL(new(ELeave)CStringPool_FCopy_Transition(*iUTContext,*iTrueValidator));
90 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
91 AddTransitionL(new(ELeave)CStringPool_FClose_Transition(*iUTContext,*iFalseValidator));
92 AddTransitionL(new(ELeave)CStringPool_FStringToken_Transition(*iUTContext,*iTrueValidator));
93 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
94 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
98 // ______________________________________________________________________________
100 _LIT(KStringPoolSmallTableUnitTest,"CStringPool_ShortTable_UnitTest");
102 CStringPool_ShortTable_UnitTest* CStringPool_ShortTable_UnitTest::NewL(CDataLogger& aDataLogger,
103 MUnitTestObserver& aObserver)
105 CStringPool_ShortTable_UnitTest* self =
106 new(ELeave) CStringPool_ShortTable_UnitTest(aDataLogger,
108 CleanupStack::PushL(self);
114 inline TInt CStringPool_ShortTable_UnitTest::RunError(TInt aError)
116 // The RunL left so chain to the base first and then cleanup
117 TInt error = CUnitTest::RunError(aError); // Chain to base
119 delete iStateAccessor;
120 delete iTrueValidator;
121 delete iFalseValidator;
125 inline CStringPool_ShortTable_UnitTest::~CStringPool_ShortTable_UnitTest()
127 // Simply delete our test class instance
129 delete iStateAccessor;
130 delete iTrueValidator;
131 delete iFalseValidator;
134 inline CStringPool_ShortTable_UnitTest::CStringPool_ShortTable_UnitTest(CDataLogger& aDataLogger,
135 MUnitTestObserver& aObserver)
136 : CUnitTest(KStringPoolSmallTableUnitTest, aDataLogger, aObserver)
141 // Now the Individual transitions need to be added.
142 inline void CStringPool_ShortTable_UnitTest::ConstructL()
144 // Perform the base class initialization
145 UnitTestConstructL();
147 // Create the Unit test state accessor
148 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
149 // Construct the Unit test context.
150 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
151 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
152 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
153 AddTransitionL(new(ELeave)CStringPool_ShortCtor_Transition(*iUTContext,*iFalseValidator));
154 // testing defect fixes : BEU-55DJG3, KRN-56NDEZ,APY-57TEH3, HAD-57SK27
155 AddTransitionL(new(ELeave)CStringPool_BEU55DJG3_Transition(*iUTContext,*iTrueValidator));
156 AddTransitionL(new(ELeave)CStringPool_KRN56NDEZ_Transition(*iUTContext,*iTrueValidator));
157 AddTransitionL(new(ELeave)CStringPool_APY57TEH3_Transition(*iUTContext,*iTrueValidator));
158 AddTransitionL(new(ELeave)CStringPool_HAD57SK27_Transition(*iUTContext,*iTrueValidator));
160 // end defect fix tests
161 AddTransitionL(new(ELeave)CStringPool_FAeqA_Transition(*iUTContext,*iTrueValidator));
162 AddTransitionL(new(ELeave)CStringPool_FAneA_Transition(*iUTContext,*iFalseValidator));
163 AddTransitionL(new(ELeave)CStringPool_FAneB_Transition(*iUTContext,*iTrueValidator));
164 AddTransitionL(new(ELeave)CStringPool_FAeqB_Transition(*iUTContext,*iFalseValidator));
165 AddTransitionL(new(ELeave)CStringPool_FAeqD_Transition(*iUTContext,*iTrueValidator));
166 AddTransitionL(new(ELeave)CStringPool_FAneD_Transition(*iUTContext,*iFalseValidator));
167 AddTransitionL(new(ELeave)CStringPool_FDesc_Transition(*iUTContext,*iFalseValidator));
168 AddTransitionL(new(ELeave)CStringPool_FCopy_Transition(*iUTContext,*iTrueValidator));
169 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
170 AddTransitionL(new(ELeave)CStringPool_FClose_Transition(*iUTContext,*iFalseValidator));
171 AddTransitionL(new(ELeave)CStringPool_FInt_Transition(*iUTContext,*iTrueValidator));
173 AddTransitionL(new(ELeave)CStringPool_StringF_Index_Table_Transition(*iUTContext,*iTrueValidator));
174 AddTransitionL(new(ELeave)CStringPool_FStringToken_Transition(*iUTContext,*iTrueValidator));
175 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
176 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
177 AddTransitionL(new(ELeave)CStringPool_Short_CB_Transition(*iUTContext,*iTrueValidator));
182 // ______________________________________________________________________________
184 _LIT(KStringPoolIrrelevantTableUnitTest,"CStringPool_IrrelevantTable_UnitTest");
186 CStringPool_IrrelevantTable_UnitTest* CStringPool_IrrelevantTable_UnitTest::NewL(CDataLogger& aDataLogger,
187 MUnitTestObserver& aObserver)
189 CStringPool_IrrelevantTable_UnitTest* self =
190 new(ELeave) CStringPool_IrrelevantTable_UnitTest(aDataLogger,
192 CleanupStack::PushL(self);
198 inline TInt CStringPool_IrrelevantTable_UnitTest::RunError(TInt aError)
200 // The RunL left so chain to the base first and then cleanup
201 TInt error = CUnitTest::RunError(aError); // Chain to base
203 delete iStateAccessor;
204 delete iTrueValidator;
205 delete iFalseValidator;
209 inline CStringPool_IrrelevantTable_UnitTest::~CStringPool_IrrelevantTable_UnitTest()
211 // Simply delete our test class instance
213 delete iStateAccessor;
214 delete iTrueValidator;
215 delete iFalseValidator;
218 inline CStringPool_IrrelevantTable_UnitTest::CStringPool_IrrelevantTable_UnitTest(CDataLogger& aDataLogger,
219 MUnitTestObserver& aObserver)
220 : CUnitTest(KStringPoolIrrelevantTableUnitTest, aDataLogger, aObserver)
225 // Now the Individual transitions need to be added.
226 inline void CStringPool_IrrelevantTable_UnitTest::ConstructL()
228 // Perform the base class initialization
229 UnitTestConstructL();
231 // Create the Unit test state accessor
232 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
233 // Construct the Unit test context.
234 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
235 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
236 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
237 AddTransitionL(new(ELeave)CStringPool_IrrelevantCtor_Transition(*iUTContext,*iFalseValidator));
238 AddTransitionL(new(ELeave)CStringPool_FAeqA_Transition(*iUTContext,*iTrueValidator));
239 AddTransitionL(new(ELeave)CStringPool_FAneA_Transition(*iUTContext,*iFalseValidator));
240 AddTransitionL(new(ELeave)CStringPool_FAneB_Transition(*iUTContext,*iTrueValidator));
241 AddTransitionL(new(ELeave)CStringPool_FAeqB_Transition(*iUTContext,*iFalseValidator));
242 AddTransitionL(new(ELeave)CStringPool_FAeqD_Transition(*iUTContext,*iTrueValidator));
243 AddTransitionL(new(ELeave)CStringPool_FAneD_Transition(*iUTContext,*iFalseValidator));
244 AddTransitionL(new(ELeave)CStringPool_FDesc_Transition(*iUTContext,*iFalseValidator));
245 AddTransitionL(new(ELeave)CStringPool_FCopy_Transition(*iUTContext,*iTrueValidator));
246 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
247 AddTransitionL(new(ELeave)CStringPool_FClose_Transition(*iUTContext,*iFalseValidator));
248 AddTransitionL(new(ELeave)CStringPool_FInt_Transition(*iUTContext,*iTrueValidator));
249 AddTransitionL(new(ELeave)CStringPool_FStringToken_Transition(*iUTContext,*iTrueValidator));
250 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
251 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
255 // ______________________________________________________________________________
257 _LIT(KStringPoolLargeTableUnitTest,"CStringPool_LongTable_UnitTest");
259 CStringPool_LongTable_UnitTest* CStringPool_LongTable_UnitTest::NewL(CDataLogger& aDataLogger,
260 MUnitTestObserver& aObserver)
262 CStringPool_LongTable_UnitTest* self =
263 new(ELeave) CStringPool_LongTable_UnitTest(aDataLogger,
265 CleanupStack::PushL(self);
271 inline TInt CStringPool_LongTable_UnitTest::RunError(TInt aError)
273 // The RunL left so chain to the base first and then cleanup
274 TInt error = CUnitTest::RunError(aError); // Chain to base
276 delete iStateAccessor;
277 delete iTrueValidator;
278 delete iFalseValidator;
282 inline CStringPool_LongTable_UnitTest::~CStringPool_LongTable_UnitTest()
284 // Simply delete our test class instance
286 delete iStateAccessor;
287 delete iTrueValidator;
288 delete iFalseValidator;
291 inline CStringPool_LongTable_UnitTest::CStringPool_LongTable_UnitTest(CDataLogger& aDataLogger,
292 MUnitTestObserver& aObserver)
293 : CUnitTest(KStringPoolLargeTableUnitTest, aDataLogger, aObserver)
298 // Now the Individual transitions need to be added.
299 inline void CStringPool_LongTable_UnitTest::ConstructL()
301 // Perform the base class initialization
302 UnitTestConstructL();
304 // Create the Unit test state accessor
305 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
306 // Construct the Unit test context.
307 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
308 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
309 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
310 AddTransitionL(new(ELeave)CStringPool_LongCtor_Transition(*iUTContext,*iFalseValidator));
311 AddTransitionL(new(ELeave)CStringPool_FAeqA_Transition(*iUTContext,*iTrueValidator));
312 AddTransitionL(new(ELeave)CStringPool_FAneA_Transition(*iUTContext,*iFalseValidator));
313 AddTransitionL(new(ELeave)CStringPool_FAneB_Transition(*iUTContext,*iTrueValidator));
314 AddTransitionL(new(ELeave)CStringPool_FAeqB_Transition(*iUTContext,*iFalseValidator));
315 AddTransitionL(new(ELeave)CStringPool_FAeqD_Transition(*iUTContext,*iTrueValidator));
316 AddTransitionL(new(ELeave)CStringPool_FAneD_Transition(*iUTContext,*iFalseValidator));
317 AddTransitionL(new(ELeave)CStringPool_FDesc_Transition(*iUTContext,*iFalseValidator));
318 AddTransitionL(new(ELeave)CStringPool_FCopy_Transition(*iUTContext,*iTrueValidator));
319 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
320 AddTransitionL(new(ELeave)CStringPool_FClose_Transition(*iUTContext,*iFalseValidator));
321 AddTransitionL(new(ELeave)CStringPool_FInt_Transition(*iUTContext,*iTrueValidator));
323 AddTransitionL(new(ELeave)CStringPool_StringF_Index_Table_Transition(*iUTContext,*iTrueValidator));
324 AddTransitionL(new(ELeave)CStringPool_FStringToken_Transition(*iUTContext,*iTrueValidator));
325 AddTransitionL(new(ELeave)CStringPool_FCDesC_Transition(*iUTContext,*iFalseValidator));
326 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
329 // ______________________________________________________________________________
331 _LIT(KStringPoolCaseSensitiveUnitTest,"CStringPool_CaseSensitive_UnitTest");
333 CStringPool_CaseSensitive_UnitTest* CStringPool_CaseSensitive_UnitTest::NewL(CDataLogger& aDataLogger,
334 MUnitTestObserver& aObserver)
336 CStringPool_CaseSensitive_UnitTest* self =
337 new(ELeave) CStringPool_CaseSensitive_UnitTest(aDataLogger,
339 CleanupStack::PushL(self);
341 CleanupStack::Pop(self);
345 inline TInt CStringPool_CaseSensitive_UnitTest::RunError(TInt aError)
347 // The RunL left so chain to the base first and then cleanup
348 TInt error = CUnitTest::RunError(aError); // Chain to base
350 delete iStateAccessor;
351 delete iTrueValidator;
352 delete iFalseValidator;
356 inline CStringPool_CaseSensitive_UnitTest::~CStringPool_CaseSensitive_UnitTest()
358 // Simply delete our test class instance
360 delete iStateAccessor;
361 delete iTrueValidator;
362 delete iFalseValidator;
365 inline CStringPool_CaseSensitive_UnitTest::CStringPool_CaseSensitive_UnitTest(CDataLogger& aDataLogger,
366 MUnitTestObserver& aObserver)
367 : CUnitTest(KStringPoolCaseSensitiveUnitTest, aDataLogger, aObserver)
372 // Now the Individual transitions need to be added.
373 inline void CStringPool_CaseSensitive_UnitTest::ConstructL()
375 // Perform the base class initialization
376 UnitTestConstructL();
378 // Create the Unit test state accessor
379 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
380 // Construct the Unit test context.
381 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
382 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
383 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
385 AddTransitionL(new(ELeave)CStringPool_ShortCSCtor_Transition(*iUTContext,*iFalseValidator));
386 AddTransitionL(new(ELeave)CStringPool_AeqA_Transition(*iUTContext,*iTrueValidator));
387 AddTransitionL(new(ELeave)CStringPool_AneA_Transition(*iUTContext,*iFalseValidator));
388 AddTransitionL(new(ELeave)CStringPool_AneB_Transition(*iUTContext,*iTrueValidator));
389 AddTransitionL(new(ELeave)CStringPool_AeqB_Transition(*iUTContext,*iFalseValidator));
390 AddTransitionL(new(ELeave)CStringPool_AeqD_Transition(*iUTContext,*iTrueValidator));
391 AddTransitionL(new(ELeave)CStringPool_AneD_Transition(*iUTContext,*iFalseValidator));
392 AddTransitionL(new(ELeave)CStringPool_Desc_Transition(*iUTContext,*iFalseValidator));
393 AddTransitionL(new(ELeave)CStringPool_Copy_Transition(*iUTContext,*iTrueValidator));
394 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
395 AddTransitionL(new(ELeave)CStringPool_Close_Transition(*iUTContext,*iFalseValidator));
396 AddTransitionL(new(ELeave)CStringPool_Int_Transition(*iUTContext,*iTrueValidator));
398 AddTransitionL(new(ELeave)CStringPool_String_Index_Table_Transition(*iUTContext,*iTrueValidator));
399 AddTransitionL(new(ELeave)CStringPool_StringToken_Transition(*iUTContext,*iTrueValidator));
400 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
401 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
404 // ______________________________________________________________________________
406 _LIT(KStringPoolSmallTableCSUnitTest,"CStringPool_ShortTableCS_UnitTest");
408 CStringPool_ShortTableCS_UnitTest* CStringPool_ShortTableCS_UnitTest::NewL(CDataLogger& aDataLogger,
409 MUnitTestObserver& aObserver)
411 CStringPool_ShortTableCS_UnitTest* self =
412 new(ELeave) CStringPool_ShortTableCS_UnitTest(aDataLogger,
414 CleanupStack::PushL(self);
416 CleanupStack::Pop(self);
420 inline TInt CStringPool_ShortTableCS_UnitTest::RunError(TInt aError)
422 // The RunL left so chain to the base first and then cleanup
423 TInt error = CUnitTest::RunError(aError); // Chain to base
425 delete iStateAccessor;
426 delete iTrueValidator;
427 delete iFalseValidator;
431 inline CStringPool_ShortTableCS_UnitTest::~CStringPool_ShortTableCS_UnitTest()
433 // Simply delete our test class instance
435 delete iStateAccessor;
436 delete iTrueValidator;
437 delete iFalseValidator;
440 inline CStringPool_ShortTableCS_UnitTest::CStringPool_ShortTableCS_UnitTest(CDataLogger& aDataLogger,
441 MUnitTestObserver& aObserver)
442 : CUnitTest(KStringPoolSmallTableCSUnitTest, aDataLogger, aObserver)
447 // Now the Individual transitions need to be added.
448 inline void CStringPool_ShortTableCS_UnitTest::ConstructL()
450 // Perform the base class initialization
451 UnitTestConstructL();
453 // Create the Unit test state accessor
454 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
455 // Construct the Unit test context.
456 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
457 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
458 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
459 AddTransitionL(new(ELeave)CStringPool_ShortCSCtor_Transition(*iUTContext,*iFalseValidator));
460 AddTransitionL(new(ELeave)CStringPool_AeqA_Transition(*iUTContext,*iTrueValidator));
461 AddTransitionL(new(ELeave)CStringPool_AneA_Transition(*iUTContext,*iFalseValidator));
462 AddTransitionL(new(ELeave)CStringPool_AneB_Transition(*iUTContext,*iTrueValidator));
463 AddTransitionL(new(ELeave)CStringPool_AeqB_Transition(*iUTContext,*iFalseValidator));
464 AddTransitionL(new(ELeave)CStringPool_AeqD_Transition(*iUTContext,*iTrueValidator));
465 AddTransitionL(new(ELeave)CStringPool_AneD_Transition(*iUTContext,*iFalseValidator));
466 AddTransitionL(new(ELeave)CStringPool_Desc_Transition(*iUTContext,*iFalseValidator));
467 AddTransitionL(new(ELeave)CStringPool_Copy_Transition(*iUTContext,*iTrueValidator));
468 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
469 AddTransitionL(new(ELeave)CStringPool_Close_Transition(*iUTContext,*iFalseValidator));
470 AddTransitionL(new(ELeave)CStringPool_Int_Transition(*iUTContext,*iTrueValidator));
472 AddTransitionL(new(ELeave)CStringPool_String_Index_Table_Transition(*iUTContext,*iTrueValidator));
473 AddTransitionL(new(ELeave)CStringPool_StringToken_Transition(*iUTContext,*iTrueValidator));
474 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
475 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
480 // ______________________________________________________________________________
482 _LIT(KStringPoolIrrelevantTableCSUnitTest,"CStringPool_IrrelevantTableCS_UnitTest");
484 CStringPool_IrrelevantTableCS_UnitTest* CStringPool_IrrelevantTableCS_UnitTest::NewL(CDataLogger& aDataLogger,
485 MUnitTestObserver& aObserver)
487 CStringPool_IrrelevantTableCS_UnitTest* self =
488 new(ELeave) CStringPool_IrrelevantTableCS_UnitTest(aDataLogger,
490 CleanupStack::PushL(self);
492 CleanupStack::Pop(self);
496 inline TInt CStringPool_IrrelevantTableCS_UnitTest::RunError(TInt aError)
498 // The RunL left so chain to the base first and then cleanup
499 TInt error = CUnitTest::RunError(aError); // Chain to base
501 delete iStateAccessor;
502 delete iTrueValidator;
503 delete iFalseValidator;
507 inline CStringPool_IrrelevantTableCS_UnitTest::~CStringPool_IrrelevantTableCS_UnitTest()
509 // Simply delete our test class instance
511 delete iStateAccessor;
512 delete iTrueValidator;
513 delete iFalseValidator;
516 inline CStringPool_IrrelevantTableCS_UnitTest::CStringPool_IrrelevantTableCS_UnitTest(CDataLogger& aDataLogger,
517 MUnitTestObserver& aObserver)
518 : CUnitTest(KStringPoolIrrelevantTableCSUnitTest, aDataLogger, aObserver)
523 // Now the Individual transitions need to be added.
524 inline void CStringPool_IrrelevantTableCS_UnitTest::ConstructL()
526 // Perform the base class initialization
527 UnitTestConstructL();
529 // Create the Unit test state accessor
530 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
531 // Construct the Unit test context.
532 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
533 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
534 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
535 AddTransitionL(new(ELeave)CStringPool_IrrelevantCSCtor_Transition(*iUTContext,*iFalseValidator));
536 AddTransitionL(new(ELeave)CStringPool_AeqA_Transition(*iUTContext,*iTrueValidator));
537 AddTransitionL(new(ELeave)CStringPool_AneA_Transition(*iUTContext,*iFalseValidator));
538 AddTransitionL(new(ELeave)CStringPool_AneB_Transition(*iUTContext,*iTrueValidator));
539 AddTransitionL(new(ELeave)CStringPool_AeqB_Transition(*iUTContext,*iFalseValidator));
540 AddTransitionL(new(ELeave)CStringPool_AeqD_Transition(*iUTContext,*iTrueValidator));
541 AddTransitionL(new(ELeave)CStringPool_AneD_Transition(*iUTContext,*iFalseValidator));
542 AddTransitionL(new(ELeave)CStringPool_Desc_Transition(*iUTContext,*iFalseValidator));
543 AddTransitionL(new(ELeave)CStringPool_Copy_Transition(*iUTContext,*iTrueValidator));
544 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
545 AddTransitionL(new(ELeave)CStringPool_Close_Transition(*iUTContext,*iFalseValidator));
546 AddTransitionL(new(ELeave)CStringPool_Int_Transition(*iUTContext,*iTrueValidator));
547 AddTransitionL(new(ELeave)CStringPool_StringToken_Transition(*iUTContext,*iTrueValidator));
548 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
549 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
552 // ______________________________________________________________________________
554 _LIT(KStringPoolLargeCSUnitTest,"CStringPool_LongTableCS_UnitTest");
556 CStringPool_LongTableCS_UnitTest* CStringPool_LongTableCS_UnitTest::NewL(CDataLogger& aDataLogger,
557 MUnitTestObserver& aObserver)
559 CStringPool_LongTableCS_UnitTest* self =
560 new(ELeave) CStringPool_LongTableCS_UnitTest(aDataLogger,
562 CleanupStack::PushL(self);
564 CleanupStack::Pop(self);
568 inline TInt CStringPool_LongTableCS_UnitTest::RunError(TInt aError)
570 // The RunL left so chain to the base first and then cleanup
571 TInt error = CUnitTest::RunError(aError); // Chain to base
573 delete iStateAccessor;
574 delete iTrueValidator;
575 delete iFalseValidator;
579 inline CStringPool_LongTableCS_UnitTest::~CStringPool_LongTableCS_UnitTest()
581 // Simply delete our test class instance
583 delete iStateAccessor;
584 delete iTrueValidator;
585 delete iFalseValidator;
588 inline CStringPool_LongTableCS_UnitTest::CStringPool_LongTableCS_UnitTest(CDataLogger& aDataLogger,
589 MUnitTestObserver& aObserver)
590 : CUnitTest(KStringPoolLargeCSUnitTest, aDataLogger, aObserver)
595 // Now the Individual transitions need to be added.
596 inline void CStringPool_LongTableCS_UnitTest::ConstructL()
598 // Perform the base class initialization
599 UnitTestConstructL();
601 // Create the Unit test state accessor
602 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
603 // Construct the Unit test context.
604 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
605 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
606 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
607 AddTransitionL(new(ELeave)CStringPool_LargeCSCtor_Transition(*iUTContext,*iFalseValidator));
608 AddTransitionL(new(ELeave)CStringPool_AeqA_Transition(*iUTContext,*iTrueValidator));
609 AddTransitionL(new(ELeave)CStringPool_AneA_Transition(*iUTContext,*iFalseValidator));
610 AddTransitionL(new(ELeave)CStringPool_AneB_Transition(*iUTContext,*iTrueValidator));
611 AddTransitionL(new(ELeave)CStringPool_AeqB_Transition(*iUTContext,*iFalseValidator));
612 AddTransitionL(new(ELeave)CStringPool_AeqD_Transition(*iUTContext,*iTrueValidator));
613 AddTransitionL(new(ELeave)CStringPool_AneD_Transition(*iUTContext,*iFalseValidator));
614 AddTransitionL(new(ELeave)CStringPool_Desc_Transition(*iUTContext,*iFalseValidator));
615 AddTransitionL(new(ELeave)CStringPool_Copy_Transition(*iUTContext,*iTrueValidator));
616 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
617 AddTransitionL(new(ELeave)CStringPool_Close_Transition(*iUTContext,*iFalseValidator));
618 AddTransitionL(new(ELeave)CStringPool_Int_Transition(*iUTContext,*iTrueValidator));
619 AddTransitionL(new(ELeave)CStringPool_String_Index_Table_Transition(*iUTContext,*iTrueValidator));
620 AddTransitionL(new(ELeave)CStringPool_StringToken_Transition(*iUTContext,*iTrueValidator));
621 AddTransitionL(new(ELeave)CStringPool_CDesC_Transition(*iUTContext,*iFalseValidator));
622 AddTransitionL(new(ELeave)CStringPool_Dtor_Transition(*iUTContext,*iFalseValidator));
627 // ______________________________________________________________________________
629 _LIT(KStringPoolMultipleTableShortCIUnitTest,"CStringPool_MultipleTableShortCI_UnitTest");
631 CStringPool_MultipleTableShortCI_UnitTest* CStringPool_MultipleTableShortCI_UnitTest::NewL(CDataLogger& aDataLogger,
632 MUnitTestObserver& aObserver)
634 CStringPool_MultipleTableShortCI_UnitTest* self =
635 new(ELeave) CStringPool_MultipleTableShortCI_UnitTest(aDataLogger,
637 CleanupStack::PushL(self);
639 CleanupStack::Pop(self);
643 inline TInt CStringPool_MultipleTableShortCI_UnitTest::RunError(TInt aError)
645 // The RunL left so chain to the base first and then cleanup
646 TInt error = CUnitTest::RunError(aError); // Chain to base
648 delete iStateAccessor;
649 delete iTrueValidator;
650 delete iFalseValidator;
654 inline CStringPool_MultipleTableShortCI_UnitTest::~CStringPool_MultipleTableShortCI_UnitTest()
656 // Simply delete our test class instance
658 delete iStateAccessor;
659 delete iTrueValidator;
660 delete iFalseValidator;
663 inline CStringPool_MultipleTableShortCI_UnitTest::CStringPool_MultipleTableShortCI_UnitTest(CDataLogger& aDataLogger,
664 MUnitTestObserver& aObserver)
665 : CUnitTest(KStringPoolMultipleTableShortCIUnitTest, aDataLogger, aObserver)
670 // Now the Individual transitions need to be added.
671 inline void CStringPool_MultipleTableShortCI_UnitTest::ConstructL()
673 // Perform the base class initialization
674 UnitTestConstructL();
676 // Create the Unit test state accessor
677 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
678 // Construct the Unit test context.
679 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
680 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
681 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
682 AddTransitionL(new(ELeave)CStringPool_MultipleTableCICtor_Transition(*iUTContext,*iFalseValidator));
683 AddTransitionL(new(ELeave)CStringPool_FAeqB_Transition(*iUTContext,*iTrueValidator));
684 AddTransitionL(new(ELeave)CStringPool_MutlipleCICeqC_Transition(*iUTContext,*iTrueValidator));
685 AddTransitionL(new(ELeave)CStringPool_MultipleCIStringToIndex_Transition(*iUTContext,*iTrueValidator));
686 AddTransitionL(new(ELeave)CStringPool_MultipleCIDynamicString_Transition(*iUTContext,*iTrueValidator));
687 AddTransitionL(new(ELeave)CStringPool_MultipleCIIndexToStringDynamic_Transition(*iUTContext,*iTrueValidator));
689 AddTransitionL(new(ELeave)CStringPool_MultipleTableDtor_Transition(*iUTContext,*iTrueValidator));
692 // ______________________________________________________________________________
694 _LIT(KStringPoolMultipleTableShortCSUnitTest,"CStringPool_MultipleTableShortCS_UnitTest");
696 CStringPool_MultipleTableShortCS_UnitTest* CStringPool_MultipleTableShortCS_UnitTest::NewL(CDataLogger& aDataLogger,
697 MUnitTestObserver& aObserver)
699 CStringPool_MultipleTableShortCS_UnitTest* self =
700 new(ELeave) CStringPool_MultipleTableShortCS_UnitTest(aDataLogger,
702 CleanupStack::PushL(self);
704 CleanupStack::Pop(self);
708 inline TInt CStringPool_MultipleTableShortCS_UnitTest::RunError(TInt aError)
710 // The RunL left so chain to the base first and then cleanup
711 TInt error = CUnitTest::RunError(aError); // Chain to base
713 delete iStateAccessor;
714 delete iTrueValidator;
715 delete iFalseValidator;
719 inline CStringPool_MultipleTableShortCS_UnitTest::~CStringPool_MultipleTableShortCS_UnitTest()
721 // Simply delete our test class instance
723 delete iStateAccessor;
724 delete iTrueValidator;
725 delete iFalseValidator;
728 inline CStringPool_MultipleTableShortCS_UnitTest::CStringPool_MultipleTableShortCS_UnitTest(CDataLogger& aDataLogger,
729 MUnitTestObserver& aObserver)
730 : CUnitTest(KStringPoolMultipleTableShortCSUnitTest, aDataLogger, aObserver)
735 // Now the Individual transitions need to be added.
736 inline void CStringPool_MultipleTableShortCS_UnitTest::ConstructL()
738 // Perform the base class initialization
739 UnitTestConstructL();
741 // Create the Unit test state accessor
742 iStateAccessor = new(ELeave) TStringPool_StateAccessor;
743 // Construct the Unit test context.
744 iUTContext = new(ELeave) CStringPool_UnitTestContext(iDataLogger, *iStateAccessor, *this);
745 iTrueValidator = new(ELeave) TStringPool_True_TransitionValidator(*iUTContext);
746 iFalseValidator = new(ELeave) TStringPool_False_TransitionValidator(*iUTContext);
747 AddTransitionL(new(ELeave)CStringPool_MultipleTableCSCtor_Transition(*iUTContext,*iFalseValidator));
748 AddTransitionL(new(ELeave)CStringPool_AeqB_Transition(*iUTContext,*iTrueValidator));
749 AddTransitionL(new(ELeave)CStringPool_MutlipleCSCeqC_Transition(*iUTContext,*iTrueValidator));
750 AddTransitionL(new(ELeave)CStringPool_MultipleCSStringToIndex_Transition(*iUTContext,*iTrueValidator));
751 AddTransitionL(new(ELeave)CStringPool_MultipleCSDynamicString_Transition(*iUTContext,*iTrueValidator));
752 AddTransitionL(new(ELeave)CStringPool_MultipleCSIndexToStringDynamic_Transition(*iUTContext,*iTrueValidator));
754 AddTransitionL(new(ELeave)CStringPool_MultipleTableDtor_Transition(*iUTContext,*iTrueValidator));