Update contrib.
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 implementation of the transition classes upon the RStringPool class methods.
20 #include "irrelevant.h"
23 #include "irrelevantcs.h"
30 #include "securitypolicypluginstrings.h"
32 // ______________________________________________________________________________
34 _LIT(KStringPoolNewLTransition,"CStringPool_NewL_Transition");
36 inline CStringPool_NewL_Transition::CStringPool_NewL_Transition(CUnitTestContext& aUTContext,
37 TTransitionValidator& aValidator)
38 : CTransitionType(KStringPoolNewLTransition, aUTContext, aValidator)
43 inline void CStringPool_NewL_Transition::TransitMethodL()
45 _LIT(KStringPoolNewLTransitMethod, "CStringPool::NewL transition");
46 Context().DataLogger().LogInformation(KStringPoolNewLTransitMethod);
47 Context().iStringPool.OpenL();
48 RStringPool p = Context().iStringPool;
50 _LIT8(KStringA, "String");
51 _LIT8(KStringB, "Another String");
52 _LIT8(KStringD, "String");
54 _LIT8(KStringFA, "String");
55 _LIT8(KStringFB, "Another String");
56 _LIT8(KStringFD, "sTRING");
58 Context().iA = p.OpenStringL(KStringA());
59 Context().iB = p.OpenStringL(KStringB());
60 Context().iD = p.OpenStringL(KStringD());
62 Context().iFA = p.OpenFStringL(KStringFA());
63 Context().iFB = p.OpenFStringL(KStringFB());
64 Context().iFD = p.OpenFStringL(KStringFD());
66 Context().iADes.Set(KStringA);
67 Context().iBDes.Set(KStringB);
68 Context().iDDes.Set(KStringD);
70 Context().iFADes.Set(KStringFA);
71 Context().iFBDes.Set(KStringFB);
72 Context().iFDDes.Set(KStringFD);
78 inline CStringPool_UnitTestContext& CStringPool_NewL_Transition::Context() const
80 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
83 // ______________________________________________________________________________
85 _LIT(KStringPoolDtorTransition,"CStringPool_Dtor_Transition");
87 inline CStringPool_Dtor_Transition::CStringPool_Dtor_Transition(CUnitTestContext& aUTContext,
88 TTransitionValidator& aValidator)
89 : CTransitionType(KStringPoolDtorTransition, aUTContext, aValidator)
94 inline void CStringPool_Dtor_Transition::TransitMethodL()
96 _LIT(KStringPoolDtorTransitMethod, "CStringPool::Dtor transition");
97 Context().DataLogger().LogInformation(KStringPoolDtorTransitMethod);
100 Context().iB.Close();
101 Context().iD.Close();
103 Context().iFA.Close();
104 Context().iFB.Close();
105 Context().iFD.Close();
107 Context().iStringPool.Close();
113 inline CStringPool_UnitTestContext& CStringPool_Dtor_Transition::Context() const
115 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
118 // Add additional Transition class Implementations here...
120 // ______________________________________________________________________________
122 _LIT(KRStringPoolAeqATransition,"CRStringPool_AeqA_Transition");
124 inline CStringPool_AeqA_Transition::CStringPool_AeqA_Transition(CUnitTestContext& aUTContext,
125 TTransitionValidator& aValidator)
126 : CTransitionType(KRStringPoolAeqATransition, aUTContext, aValidator)
131 inline void CStringPool_AeqA_Transition::TransitMethodL()
133 _LIT(KRStringPoolAeqATransitMethod, "CRStringPool::AeqA transition");
134 Context().DataLogger().LogInformation(KRStringPoolAeqATransitMethod);
135 RString temp = Context().iA;
136 Context().iResult = Context().iA == temp;;
139 inline CStringPool_UnitTestContext& CStringPool_AeqA_Transition::Context() const
141 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
144 // ______________________________________________________________________________
146 _LIT(KStringPoolAneATransition,"CStringPool_AneA_Transition");
148 inline CStringPool_AneA_Transition::CStringPool_AneA_Transition(CUnitTestContext& aUTContext,
149 TTransitionValidator& aValidator)
150 : CTransitionType(KStringPoolAneATransition, aUTContext, aValidator)
155 inline void CStringPool_AneA_Transition::TransitMethodL()
157 _LIT(KStringPoolAneATransitMethod, "CStringPool::AneA transition");
158 Context().DataLogger().LogInformation(KStringPoolAneATransitMethod);
159 RString temp = Context().iA;
160 Context().iResult = Context().iA != temp;;
163 inline CStringPool_UnitTestContext& CStringPool_AneA_Transition::Context() const
165 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
168 // ______________________________________________________________________________
170 _LIT(KStringPoolAeqBTransition,"CStringPool_AeqB_Transition");
172 inline CStringPool_AeqB_Transition::CStringPool_AeqB_Transition(CUnitTestContext& aUTContext,
173 TTransitionValidator& aValidator)
174 : CTransitionType(KStringPoolAeqBTransition, aUTContext, aValidator)
179 inline void CStringPool_AeqB_Transition::TransitMethodL()
181 _LIT(KStringPoolAeqBTransitMethod, "CStringPool::AeqB transition");
182 Context().DataLogger().LogInformation(KStringPoolAeqBTransitMethod);
183 Context().iResult = Context().iA == Context().iB;
186 inline CStringPool_UnitTestContext& CStringPool_AeqB_Transition::Context() const
188 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
191 // ______________________________________________________________________________
193 _LIT(KStringPoolAneBTransition,"CStringPool_AneB_Transition");
195 inline CStringPool_AneB_Transition::CStringPool_AneB_Transition(CUnitTestContext& aUTContext,
196 TTransitionValidator& aValidator)
197 : CTransitionType(KStringPoolAneBTransition, aUTContext, aValidator)
202 inline void CStringPool_AneB_Transition::TransitMethodL()
204 _LIT(KStringPoolAneBTransitMethod, "CStringPool::AneB transition");
205 Context().DataLogger().LogInformation(KStringPoolAneBTransitMethod);
206 Context().iResult = Context().iA != Context().iB;
209 inline CStringPool_UnitTestContext& CStringPool_AneB_Transition::Context() const
211 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
214 // ______________________________________________________________________________
216 _LIT(KStringPoolAeqDTransition,"CStringPool_AeqD_Transition");
218 inline CStringPool_AeqD_Transition::CStringPool_AeqD_Transition(CUnitTestContext& aUTContext,
219 TTransitionValidator& aValidator)
220 : CTransitionType(KStringPoolAeqDTransition, aUTContext, aValidator)
225 inline void CStringPool_AeqD_Transition::TransitMethodL()
227 _LIT(KStringPoolAeqDTransitMethod, "CStringPool::AeqD transition");
228 Context().DataLogger().LogInformation(KStringPoolAeqDTransitMethod);
229 Context().iResult = Context().iA == Context().iD;
232 inline CStringPool_UnitTestContext& CStringPool_AeqD_Transition::Context() const
234 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
237 // ______________________________________________________________________________
239 _LIT(KStringPoolAneDTransition,"CStringPool_AneD_Transition");
241 inline CStringPool_AneD_Transition::CStringPool_AneD_Transition(CUnitTestContext& aUTContext,
242 TTransitionValidator& aValidator)
243 : CTransitionType(KStringPoolAneDTransition, aUTContext, aValidator)
248 inline void CStringPool_AneD_Transition::TransitMethodL()
250 _LIT(KStringPoolAneDTransitMethod, "CStringPool::AneD transition");
251 Context().DataLogger().LogInformation(KStringPoolAneDTransitMethod);
252 Context().iResult = Context().iA != Context().iD;
255 inline CStringPool_UnitTestContext& CStringPool_AneD_Transition::Context() const
257 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
261 // ______________________________________________________________________________
263 _LIT(KStringPoolDescTransition,"CStringPool_Desc_Transition");
265 inline CStringPool_Desc_Transition::CStringPool_Desc_Transition(CUnitTestContext& aUTContext,
266 TTransitionValidator& aValidator)
267 : CTransitionType(KStringPoolDescTransition, aUTContext, aValidator)
272 inline void CStringPool_Desc_Transition::TransitMethodL()
274 _LIT(KStringPoolDescTransitMethod, "CStringPool::Desc transition");
275 Context().DataLogger().LogInformation(KStringPoolDescTransitMethod);
276 Context().iResult = Context().iADes.Compare(Context().iA.DesC());
279 inline CStringPool_UnitTestContext& CStringPool_Desc_Transition::Context() const
281 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
284 // ______________________________________________________________________________
286 _LIT(KStringPoolCopyTransition,"CStringPool_Copy_Transition");
288 inline CStringPool_Copy_Transition::CStringPool_Copy_Transition(CUnitTestContext& aUTContext,
289 TTransitionValidator& aValidator)
290 : CTransitionType(KStringPoolCopyTransition, aUTContext, aValidator)
295 inline void CStringPool_Copy_Transition::TransitMethodL()
297 _LIT(KStringPoolCopyTransitMethod, "CStringPool::Copy transition");
298 Context().DataLogger().LogInformation(KStringPoolCopyTransitMethod);
299 Context().iC = Context().iA.Copy();
300 Context().iResult = Context().iA == Context().iC;
303 inline CStringPool_UnitTestContext& CStringPool_Copy_Transition::Context() const
305 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
309 // ______________________________________________________________________________
311 _LIT(KStringPoolCDesCTransition,"CStringPool_CDesC_Transition");
313 inline CStringPool_CDesC_Transition::CStringPool_CDesC_Transition(CUnitTestContext& aUTContext,
314 TTransitionValidator& aValidator)
315 : CTransitionType(KStringPoolCDesCTransition, aUTContext, aValidator)
320 inline void CStringPool_CDesC_Transition::TransitMethodL()
322 _LIT(KStringPoolCDesCTransitMethod, "CStringPool::CDesC transition");
323 Context().DataLogger().LogInformation(KStringPoolCDesCTransitMethod);
324 Context().iResult = Context().iADes.Compare(Context().iC.DesC());
327 inline CStringPool_UnitTestContext& CStringPool_CDesC_Transition::Context() const
329 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
332 // ______________________________________________________________________________
334 _LIT(KStringPoolCloseTransition,"CStringPool_Close_Transition");
336 inline CStringPool_Close_Transition::CStringPool_Close_Transition(CUnitTestContext& aUTContext,
337 TTransitionValidator& aValidator)
338 : CTransitionType(KStringPoolCloseTransition, aUTContext, aValidator)
343 inline void CStringPool_Close_Transition::TransitMethodL()
345 _LIT(KStringPoolCloseTransitMethod, "CStringPool::Close transition");
346 Context().DataLogger().LogInformation(KStringPoolCloseTransitMethod);
347 Context().iC.Close();
350 inline CStringPool_UnitTestContext& CStringPool_Close_Transition::Context() const
352 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
355 // ______________________________________________________________________________
357 _LIT(KStringPoolIntTransition,"CStringPool_Int_Transition");
359 inline CStringPool_Int_Transition::CStringPool_Int_Transition(CUnitTestContext& aUTContext,
360 TTransitionValidator& aValidator)
361 : CTransitionType(KStringPoolIntTransition, aUTContext, aValidator)
366 inline void CStringPool_Int_Transition::TransitMethodL()
368 _LIT(KStringPoolIntTransitMethod, "aaCStringPool::Int transition");
369 Context().DataLogger().LogInformation(KStringPoolIntTransitMethod);
370 Context().iResult = Context().iTE.Index(Context().iTestTable) == Context().iInt;
373 inline CStringPool_UnitTestContext& CStringPool_Int_Transition::Context() const
375 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
377 // ______________________________________________________________________________
379 _LIT(KStringPoolStringTokenTransition,"CStringPool_StringToken_Transition");
381 inline CStringPool_StringToken_Transition::CStringPool_StringToken_Transition(CUnitTestContext& aUTContext,
382 TTransitionValidator& aValidator)
383 : CTransitionType(KStringPoolStringTokenTransition, aUTContext, aValidator)
388 inline void CStringPool_StringToken_Transition::TransitMethodL()
390 _LIT(KStringPoolStringTokenTransitMethod, "CStringPool::StringToken transition");
391 Context().DataLogger().LogInformation(KStringPoolStringTokenTransitMethod);
392 RStringToken t = Context().iA;
393 Context().iC = Context().iStringPool.String(t);
394 Context().iResult = Context().iC == Context().iA;
397 inline CStringPool_UnitTestContext& CStringPool_StringToken_Transition::Context() const
399 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
456 // ______________________________________________________________________________
458 _LIT(KRstringPoolFAeqATransition,"CRStringPool_AeqA_Transition");
460 inline CStringPool_FAeqA_Transition::CStringPool_FAeqA_Transition(CUnitTestContext& aUTContext,
461 TTransitionValidator& aValidator)
462 : CTransitionType(KRstringPoolFAeqATransition, aUTContext, aValidator)
467 inline void CStringPool_FAeqA_Transition::TransitMethodL()
469 _LIT(KRstringPoolFAeqATransitMethod, "CRStringPool::AeqA transition");
470 Context().DataLogger().LogInformation(KRstringPoolFAeqATransitMethod);
471 RStringF temp = Context().iFA;
472 Context().iResult = Context().iFA == temp;;
475 inline CStringPool_UnitTestContext& CStringPool_FAeqA_Transition::Context() const
477 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
480 // ______________________________________________________________________________
482 _LIT(KStringPoolFAneATransition,"CStringPool_FAneA_Transition");
484 inline CStringPool_FAneA_Transition::CStringPool_FAneA_Transition(CUnitTestContext& aUTContext,
485 TTransitionValidator& aValidator)
486 : CTransitionType(KStringPoolFAneATransition, aUTContext, aValidator)
491 inline void CStringPool_FAneA_Transition::TransitMethodL()
493 _LIT(KStringPoolFAneATransitMethod, "CStringPoolF::AneA transition");
494 Context().DataLogger().LogInformation(KStringPoolFAneATransitMethod);
495 RStringF temp = Context().iFA;
496 Context().iResult = Context().iFA != temp;;
499 inline CStringPool_UnitTestContext& CStringPool_FAneA_Transition::Context() const
501 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
504 // ______________________________________________________________________________
506 _LIT(KStringPoolFAeqBTransition,"CStringPool_FAeqB_Transition");
508 inline CStringPool_FAeqB_Transition::CStringPool_FAeqB_Transition(CUnitTestContext& aUTContext,
509 TTransitionValidator& aValidator)
510 : CTransitionType(KStringPoolFAeqBTransition, aUTContext, aValidator)
515 inline void CStringPool_FAeqB_Transition::TransitMethodL()
517 _LIT(KStringPoolFAeqBTransitMethod, "CStringPoolF::AeqB transition");
518 Context().DataLogger().LogInformation(KStringPoolFAeqBTransitMethod);
519 Context().iResult = Context().iFA == Context().iFB;
522 inline CStringPool_UnitTestContext& CStringPool_FAeqB_Transition::Context() const
524 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
527 // ______________________________________________________________________________
529 _LIT(KStringPoolFAneBTransition,"CStringPool_FAneB_Transition");
531 inline CStringPool_FAneB_Transition::CStringPool_FAneB_Transition(CUnitTestContext& aUTContext,
532 TTransitionValidator& aValidator)
533 : CTransitionType(KStringPoolFAneBTransition, aUTContext, aValidator)
538 inline void CStringPool_FAneB_Transition::TransitMethodL()
540 _LIT(KStringPoolFAneBTransitMethod, "CStringPoolF::AneB transition");
541 Context().DataLogger().LogInformation(KStringPoolFAneBTransitMethod);
542 Context().iResult = Context().iFA != Context().iFB;
545 inline CStringPool_UnitTestContext& CStringPool_FAneB_Transition::Context() const
547 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
550 // ______________________________________________________________________________
552 _LIT(KStringPoolFAeqDTransition,"CStringPool_FAeqD_Transition");
554 inline CStringPool_FAeqD_Transition::CStringPool_FAeqD_Transition(CUnitTestContext& aUTContext,
555 TTransitionValidator& aValidator)
556 : CTransitionType(KStringPoolFAeqDTransition, aUTContext, aValidator)
561 inline void CStringPool_FAeqD_Transition::TransitMethodL()
563 _LIT(KStringPoolFAeqDTransitMethod, "CStringPoolF::AeqD transition");
564 Context().DataLogger().LogInformation(KStringPoolFAeqDTransitMethod);
565 Context().iResult = Context().iFA == Context().iFD;
568 inline CStringPool_UnitTestContext& CStringPool_FAeqD_Transition::Context() const
570 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
573 // ______________________________________________________________________________
575 _LIT(KStringPoolFAneDTransition,"CStringPool_FAneD_Transition");
577 inline CStringPool_FAneD_Transition::CStringPool_FAneD_Transition(CUnitTestContext& aUTContext,
578 TTransitionValidator& aValidator)
579 : CTransitionType(KStringPoolFAneDTransition, aUTContext, aValidator)
584 inline void CStringPool_FAneD_Transition::TransitMethodL()
586 _LIT(KStringPoolFAneDTransitMethod, "CStringPoolF::AneD transition");
587 Context().DataLogger().LogInformation(KStringPoolFAneDTransitMethod);
588 Context().iResult = Context().iFA != Context().iFD;
591 inline CStringPool_UnitTestContext& CStringPool_FAneD_Transition::Context() const
593 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
597 // ______________________________________________________________________________
599 _LIT(KStringPoolFDescTransition,"CStringPool_FDesc_Transition");
601 inline CStringPool_FDesc_Transition::CStringPool_FDesc_Transition(CUnitTestContext& aUTContext,
602 TTransitionValidator& aValidator)
603 : CTransitionType(KStringPoolFDescTransition, aUTContext, aValidator)
608 inline void CStringPool_FDesc_Transition::TransitMethodL()
610 _LIT(KStringPoolFDescTransitMethod, "CStringPoolF::Desc transition");
611 Context().DataLogger().LogInformation(KStringPoolFDescTransitMethod);
612 Context().iResult = Context().iADes.Compare(Context().iFA.DesC());
615 inline CStringPool_UnitTestContext& CStringPool_FDesc_Transition::Context() const
617 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
620 // ______________________________________________________________________________
622 _LIT(KStringPoolFCopyTransition,"CStringPool_FCopy_Transition");
624 inline CStringPool_FCopy_Transition::CStringPool_FCopy_Transition(CUnitTestContext& aUTContext,
625 TTransitionValidator& aValidator)
626 : CTransitionType(KStringPoolFCopyTransition, aUTContext, aValidator)
631 inline void CStringPool_FCopy_Transition::TransitMethodL()
633 _LIT(KStringPoolFCopyTransitMethod, "CStringPoolF::Copy transition");
634 Context().DataLogger().LogInformation(KStringPoolFCopyTransitMethod);
635 Context().iFC = Context().iFA.Copy();
636 Context().iResult = Context().iFA == Context().iFC;
639 inline CStringPool_UnitTestContext& CStringPool_FCopy_Transition::Context() const
641 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
645 // ______________________________________________________________________________
647 _LIT(KStringPoolFCDesCTransition,"CStringPool_FCDesC_Transition");
649 inline CStringPool_FCDesC_Transition::CStringPool_FCDesC_Transition(CUnitTestContext& aUTContext,
650 TTransitionValidator& aValidator)
651 : CTransitionType(KStringPoolFCDesCTransition, aUTContext, aValidator)
656 inline void CStringPool_FCDesC_Transition::TransitMethodL()
658 _LIT(KStringPoolFCDesCTransitMethod, "CStringPoolF::CDesC transition");
659 Context().DataLogger().LogInformation(KStringPoolFCDesCTransitMethod);
660 Context().iResult = Context().iADes.Compare(Context().iFC.DesC());
663 inline CStringPool_UnitTestContext& CStringPool_FCDesC_Transition::Context() const
665 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
668 // ______________________________________________________________________________
670 _LIT(KStringPoolFCloseTransition,"CStringPool_FClose_Transition");
672 inline CStringPool_FClose_Transition::CStringPool_FClose_Transition(CUnitTestContext& aUTContext,
673 TTransitionValidator& aValidator)
674 : CTransitionType(KStringPoolFCloseTransition, aUTContext, aValidator)
679 inline void CStringPool_FClose_Transition::TransitMethodL()
681 _LIT(KStringPoolFCloseTransitMethod, "CStringPoolF::Close transition");
682 Context().DataLogger().LogInformation(KStringPoolFCloseTransitMethod);
683 Context().iFC.Close();
686 inline CStringPool_UnitTestContext& CStringPool_FClose_Transition::Context() const
688 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
691 // ______________________________________________________________________________
693 _LIT(KStringPoolFIntTransition,"CStringPool_FInt_Transition");
695 inline CStringPool_FInt_Transition::CStringPool_FInt_Transition(CUnitTestContext& aUTContext,
696 TTransitionValidator& aValidator)
697 : CTransitionType(KStringPoolFIntTransition, aUTContext, aValidator)
702 inline void CStringPool_FInt_Transition::TransitMethodL()
704 _LIT(KStringPoolFIntTransitMethod, "CStringPoolF::Int transition");
705 Context().DataLogger().LogInformation(KStringPoolFIntTransitMethod);
706 Context().iResult = Context().iTFE.Index(Context().iTestTable) == Context().iFint;
709 inline CStringPool_UnitTestContext& CStringPool_FInt_Transition::Context() const
711 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
713 // ______________________________________________________________________________
715 _LIT(KStringPoolFStringTokenTransition,"CStringPool_FStringToken_Transition");
717 inline CStringPool_FStringToken_Transition::CStringPool_FStringToken_Transition(CUnitTestContext& aUTContext,
718 TTransitionValidator& aValidator)
719 : CTransitionType(KStringPoolFStringTokenTransition, aUTContext, aValidator)
724 inline void CStringPool_FStringToken_Transition::TransitMethodL()
726 _LIT(KStringPoolFStringTokenTransitMethod, "CStringPoolF::StringToken transition");
727 Context().DataLogger().LogInformation(KStringPoolFStringTokenTransitMethod);
728 RStringTokenF t = Context().iFA;
729 Context().iFC = Context().iStringPool.StringF(t);
730 Context().iResult = Context().iFC == Context().iFA;
733 inline CStringPool_UnitTestContext& CStringPool_FStringToken_Transition::Context() const
735 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
737 // ______________________________________________________________________________
739 _LIT(KStringPoolSmallCtorTransition,"CStringPool_ShortCtor_Transition");
741 inline CStringPool_ShortCtor_Transition::CStringPool_ShortCtor_Transition(CUnitTestContext& aUTContext,
742 TTransitionValidator& aValidator)
743 : CTransitionType(KStringPoolSmallCtorTransition, aUTContext, aValidator)
748 inline void CStringPool_ShortCtor_Transition::TransitMethodL()
750 _LIT(KStringPoolSmallCtorTransitMethod, "CStringPool::SmallCtor transition");
751 Context().DataLogger().LogInformation(KStringPoolSmallCtorTransitMethod);
753 //Set the table used in this test
754 Context().iTestTable=Short::Table;
755 Context().iStringPool.OpenL(Context().iTestTable);
756 RStringPool p = Context().iStringPool;
758 _LIT8(KStringA, "String");
759 _LIT8(KStringB, "Another String");
760 _LIT8(KStringD, "String");
762 _LIT8(KStringFA, "String");
763 _LIT8(KStringFB, "Another String");
764 _LIT8(KStringFD, "sTRING");
767 Context().iA = p.OpenStringL(KStringA());
768 CleanupClosePushL(Context().iA);
769 Context().iB = p.OpenStringL(KStringB());
770 CleanupClosePushL(Context().iB);
771 Context().iD = p.OpenStringL(KStringD());
772 CleanupClosePushL(Context().iD);
774 Context().iFA = p.OpenFStringL(KStringFA());
775 CleanupClosePushL(Context().iFA);
776 Context().iFB = p.OpenFStringL(KStringFB());
777 CleanupClosePushL(Context().iFB);
778 Context().iFD = p.OpenFStringL(KStringFD());
779 CleanupClosePushL(Context().iFD);
782 // Context().iTE = p.String(0,Context().iTestTable);
783 Context().iTFE = p.StringF(0,Context().iTestTable);
785 // Create an empty string
786 Context().iEmptyOne = RStringF() ;
789 Context().iADes.Set(KStringA);
790 Context().iBDes.Set(KStringB);
791 Context().iDDes.Set(KStringD);
793 Context().iFADes.Set(KStringFA);
794 Context().iFBDes.Set(KStringFB);
795 Context().iFDDes.Set(KStringFD);
799 Context().iNotFound = -1;
800 CleanupStack::Pop(6);
803 inline CStringPool_UnitTestContext& CStringPool_ShortCtor_Transition::Context() const
805 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
808 // ______________________________________________________________________________
810 _LIT(KStringPoolIrrelevantCtorTransition,"CStringPool_IrrelevantCtor_Transition");
812 inline CStringPool_IrrelevantCtor_Transition::CStringPool_IrrelevantCtor_Transition(CUnitTestContext& aUTContext,
813 TTransitionValidator& aValidator)
814 : CTransition(KStringPoolIrrelevantCtorTransition, aUTContext, aValidator)
819 inline void CStringPool_IrrelevantCtor_Transition::TransitMethodL()
821 _LIT(KStringPoolIrrelevantCtorTransitMethod, "CStringPool::IrrelevantCtor transition");
822 Context().DataLogger().LogInformation(KStringPoolIrrelevantCtorTransitMethod);
824 //Set the table used in this test
825 Context().iTestTable=Irrelevant::Table;
826 Context().iStringPool.OpenL(Context().iTestTable);
827 RStringPool p = Context().iStringPool;
829 _LIT8(KStringA, "String");
830 _LIT8(KStringB, "Another String");
831 _LIT8(KStringD, "String");
833 _LIT8(KStringFA, "String");
834 _LIT8(KStringFB, "Another String");
835 _LIT8(KStringFD, "sTRING");
837 Context().iA = p.OpenStringL(KStringA());
838 Context().iB = p.OpenStringL(KStringB());
839 Context().iD = p.OpenStringL(KStringD());
841 Context().iFA = p.OpenFStringL(KStringFA());
842 Context().iFB = p.OpenFStringL(KStringFB());
843 Context().iFD = p.OpenFStringL(KStringFD());
845 // Context().iTE = p.String(0,Context().iTestTable);
846 Context().iTFE = p.StringF(0,Context().iTestTable);
848 Context().iADes.Set(KStringA);
849 Context().iBDes.Set(KStringB);
850 Context().iDDes.Set(KStringD);
852 Context().iFADes.Set(KStringFA);
853 Context().iFBDes.Set(KStringFB);
854 Context().iFDDes.Set(KStringFD);
860 inline CStringPool_UnitTestContext& CStringPool_IrrelevantCtor_Transition::Context() const
862 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
865 // ______________________________________________________________________________
867 _LIT(KStringPoolLongCtorTransition,"CStringPool_LongCtor_Transition");
869 inline CStringPool_LongCtor_Transition::CStringPool_LongCtor_Transition(CUnitTestContext& aUTContext,
870 TTransitionValidator& aValidator)
871 : CTransition(KStringPoolLongCtorTransition, aUTContext, aValidator)
876 inline void CStringPool_LongCtor_Transition::TransitMethodL()
878 _LIT(KStringPoolLongCtorTransitMethod, "CStringPool::LongCtor transition");
879 Context().DataLogger().LogInformation(KStringPoolLongCtorTransitMethod);
881 //Set the table used in this test
882 Context().iTestTable=Long::Table;
883 Context().iStringPool.OpenL(Context().iTestTable);
884 RStringPool p = Context().iStringPool;
886 _LIT8(KStringA, "String");
887 _LIT8(KStringB, "Another String");
888 _LIT8(KStringD, "String");
890 _LIT8(KStringFA, "String");
891 _LIT8(KStringFB, "Another String");
892 _LIT8(KStringFD, "sTRING");
894 Context().iA = p.OpenStringL(KStringA());
895 Context().iB = p.OpenStringL(KStringB());
896 Context().iD = p.OpenStringL(KStringD());
898 Context().iFA = p.OpenFStringL(KStringFA());
899 Context().iFB = p.OpenFStringL(KStringFB());
900 Context().iFD = p.OpenFStringL(KStringFD());
902 // Context().iTE = p.String(0,Context().iTestTable);
903 Context().iTFE = p.StringF(0,Context().iTestTable);
905 Context().iADes.Set(KStringA);
906 Context().iBDes.Set(KStringB);
907 Context().iDDes.Set(KStringD);
909 Context().iFADes.Set(KStringFA);
910 Context().iFBDes.Set(KStringFB);
911 Context().iFDDes.Set(KStringFD);
917 inline CStringPool_UnitTestContext& CStringPool_LongCtor_Transition::Context() const
919 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
922 //____________________________________________________________________
924 _LIT(KStringPoolStringF_Index_TableTransition,"CStringPool_StringF_Index_Table_Transition");
926 inline CStringPool_StringF_Index_Table_Transition::CStringPool_StringF_Index_Table_Transition(CUnitTestContext& aUTContext,
927 TTransitionValidator& aValidator)
928 : CTransitionType(KStringPoolStringF_Index_TableTransition, aUTContext, aValidator)
933 inline void CStringPool_StringF_Index_Table_Transition::TransitMethodL()
935 _LIT(KStringPoolStringF_Index_TableTransitMethod, "CStringPool::StringF_Index_Table transition");
936 Context().DataLogger().LogInformation(KStringPoolStringF_Index_TableTransitMethod);
938 Context().iResult = Context().iTFE == Context().iFA;
941 inline CStringPool_UnitTestContext& CStringPool_StringF_Index_Table_Transition::Context() const
943 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
946 // ______________________________________________________________________________
948 _LIT(KStringPoolshortCSCtorTransition,"CStringPool_ShortCSCtor_Transition");
950 inline CStringPool_ShortCSCtor_Transition::CStringPool_ShortCSCtor_Transition(CUnitTestContext& aUTContext,
951 TTransitionValidator& aValidator)
952 : CTransitionType(KStringPoolshortCSCtorTransition, aUTContext, aValidator)
957 inline void CStringPool_ShortCSCtor_Transition::TransitMethodL()
959 _LIT(KStringPoolshortCSCtorTransitMethod, "CStringPool::ShortCSCtor transition");
960 Context().DataLogger().LogInformation(KStringPoolshortCSCtorTransitMethod);
963 //Set the table used in this test
964 Context().iTestTable=ShortCS::Table;
965 Context().iStringPool.OpenL(Context().iTestTable);
966 RStringPool p = Context().iStringPool;
968 _LIT8(KStringA, "String");
969 _LIT8(KStringB, "Another String");
970 _LIT8(KStringD, "String");
972 _LIT8(KStringFA, "String");
973 _LIT8(KStringFB, "Another String");
974 _LIT8(KStringFD, "sTRING");
977 Context().iA = p.OpenStringL(KStringA());
978 CleanupClosePushL(Context().iA);
979 Context().iB = p.OpenStringL(KStringB());
980 CleanupClosePushL(Context().iB);
981 Context().iD = p.OpenStringL(KStringD());
982 CleanupClosePushL(Context().iD);
984 Context().iFA = p.OpenFStringL(KStringFA());
985 CleanupClosePushL(Context().iFA);
986 Context().iFB = p.OpenFStringL(KStringFB());
987 CleanupClosePushL(Context().iFB);
988 Context().iFD = p.OpenFStringL(KStringFD());
989 CleanupClosePushL(Context().iFD);
991 Context().iTE = p.String(0,Context().iTestTable);
992 // Context().iTFE = p.StringF(0,Context().iTestTable);
995 Context().iADes.Set(KStringA);
996 Context().iBDes.Set(KStringB);
997 Context().iDDes.Set(KStringD);
999 Context().iFADes.Set(KStringFA);
1000 Context().iFBDes.Set(KStringFB);
1001 Context().iFDDes.Set(KStringFD);
1005 CleanupStack::Pop(6);
1008 inline CStringPool_UnitTestContext& CStringPool_ShortCSCtor_Transition::Context() const
1010 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1012 // ______________________________________________________________________________
1014 _LIT(KStringPoolString_Index_TableTransition,"CStringPool_String_Index_Table_Transition");
1016 inline CStringPool_String_Index_Table_Transition::CStringPool_String_Index_Table_Transition(CUnitTestContext& aUTContext,
1017 TTransitionValidator& aValidator)
1018 : CTransitionType(KStringPoolString_Index_TableTransition, aUTContext, aValidator)
1023 inline void CStringPool_String_Index_Table_Transition::TransitMethodL()
1025 _LIT(KStringPoolString_Index_TableTransitMethod, "CStringPool::String_Index_Table transition");
1026 Context().DataLogger().LogInformation(KStringPoolString_Index_TableTransitMethod);
1028 Context().iResult = Context().iTE == Context().iA;
1031 inline CStringPool_UnitTestContext& CStringPool_String_Index_Table_Transition::Context() const
1033 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1038 // ______________________________________________________________________________
1040 _LIT(KStringPoolIrrelevantCSCtorTransition,"CStringPool_IrrelevantCSCtor_Transition");
1042 inline CStringPool_IrrelevantCSCtor_Transition::CStringPool_IrrelevantCSCtor_Transition(CUnitTestContext& aUTContext,
1043 TTransitionValidator& aValidator)
1044 : CTransitionType(KStringPoolIrrelevantCSCtorTransition, aUTContext, aValidator)
1049 inline void CStringPool_IrrelevantCSCtor_Transition::TransitMethodL()
1051 _LIT(KStringPoolIrrelevantCSCtorTransitMethod, "CStringPool::IrrelevantCSCtor transition");
1052 Context().DataLogger().LogInformation(KStringPoolIrrelevantCSCtorTransitMethod);
1054 //Set the table used in this test
1055 Context().iTestTable=IrrelevantCS::Table;
1056 Context().iStringPool.OpenL(Context().iTestTable);
1057 RStringPool p = Context().iStringPool;
1059 _LIT8(KStringA, "String");
1060 _LIT8(KStringB, "Another String");
1061 _LIT8(KStringD, "String");
1063 _LIT8(KStringFA, "String");
1064 _LIT8(KStringFB, "Another String");
1065 _LIT8(KStringFD, "sTRING");
1067 Context().iA = p.OpenStringL(KStringA());
1068 Context().iB = p.OpenStringL(KStringB());
1069 Context().iD = p.OpenStringL(KStringD());
1071 Context().iFA = p.OpenFStringL(KStringFA());
1072 Context().iFB = p.OpenFStringL(KStringFB());
1073 Context().iFD = p.OpenFStringL(KStringFD());
1075 Context().iTE = p.String(0,Context().iTestTable);
1076 // Context().iTFE = p.StringF(0,Context().iTestTable);
1078 Context().iADes.Set(KStringA);
1079 Context().iBDes.Set(KStringB);
1080 Context().iDDes.Set(KStringD);
1082 Context().iFADes.Set(KStringFA);
1083 Context().iFBDes.Set(KStringFB);
1084 Context().iFDDes.Set(KStringFD);
1087 Context().iFint = 0;
1091 inline CStringPool_UnitTestContext& CStringPool_IrrelevantCSCtor_Transition::Context() const
1093 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1096 // ______________________________________________________________________________
1098 _LIT(KStringPoolLargeCSCtorTransition,"CStringPool_LargeCSCtor_Transition");
1100 inline CStringPool_LargeCSCtor_Transition::CStringPool_LargeCSCtor_Transition(CUnitTestContext& aUTContext,
1101 TTransitionValidator& aValidator)
1102 : CTransitionType(KStringPoolLargeCSCtorTransition, aUTContext, aValidator)
1107 inline void CStringPool_LargeCSCtor_Transition::TransitMethodL()
1109 _LIT(KStringPoolLargeCSCtorTransitMethod, "CStringPool::LargeCSCtor transition");
1110 Context().DataLogger().LogInformation(KStringPoolLargeCSCtorTransitMethod);
1112 //Set the table used in this test
1113 Context().iTestTable=LongCS::Table;
1114 Context().iStringPool.OpenL(Context().iTestTable);
1115 RStringPool p = Context().iStringPool;
1117 _LIT8(KStringA, "String");
1118 _LIT8(KStringB, "Another String");
1119 _LIT8(KStringD, "String");
1121 _LIT8(KStringFA, "String");
1122 _LIT8(KStringFB, "Another String");
1123 _LIT8(KStringFD, "sTRING");
1125 Context().iA = p.OpenStringL(KStringA());
1126 Context().iB = p.OpenStringL(KStringB());
1127 Context().iD = p.OpenStringL(KStringD());
1129 Context().iFA = p.OpenFStringL(KStringFA());
1130 Context().iFB = p.OpenFStringL(KStringFB());
1131 Context().iFD = p.OpenFStringL(KStringFD());
1133 Context().iTE = p.String(0,Context().iTestTable);
1134 // Context().iTFE = p.StringF(0,Context().iTestTable);
1136 Context().iADes.Set(KStringA);
1137 Context().iBDes.Set(KStringB);
1138 Context().iDDes.Set(KStringD);
1140 Context().iFADes.Set(KStringFA);
1141 Context().iFBDes.Set(KStringFB);
1142 Context().iFDDes.Set(KStringFD);
1145 Context().iFint = 0;
1148 inline CStringPool_UnitTestContext& CStringPool_LargeCSCtor_Transition::Context() const
1150 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1152 // ______________________________________________________________________________
1154 _LIT(KStringPoolShortCtor_CBTransition,"CStringPool_Short_CB_Transition");
1156 inline CStringPool_Short_CB_Transition::CStringPool_Short_CB_Transition(CUnitTestContext& aUTContext,
1157 TTransitionValidator& aValidator)
1158 : CTransitionType(KStringPoolShortCtor_CBTransition, aUTContext, aValidator)
1167 inline void CStringPool_Short_CB_Transition::TransitMethodL()
1169 _LIT(KStringPoolShortCtor_CBTransitMethod, "CStringPool::ShortCtor_CB transition");
1170 Context().DataLogger().LogInformation(KStringPoolShortCtor_CBTransitMethod);
1172 //Set the table used in this test
1173 Context().iTestTable=Short::Table;
1175 Context().iMyExtObj.a=0;
1176 Context().iMyExtObj2.a=0;
1177 Context().iMyExtObj3.a=0;
1178 Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj);
1179 CleanupClosePushL(Context().iStringPool);
1180 Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj2);
1181 Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj3);
1182 Context().iStringPool.Close();
1183 Context().iResult= (Context().iMyExtObj.a) && (Context().iMyExtObj2.a)&&(Context().iMyExtObj3.a);
1184 CleanupStack::Pop();//Context().iStringPool
1187 inline CStringPool_UnitTestContext& CStringPool_Short_CB_Transition::Context() const
1189 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1192 // ______________________________________________________________________________
1194 _LIT(KStringPoolMultipleTableCICtorTransition,"CStringPool_MultipleTableCICtor_Transition");
1196 inline CStringPool_MultipleTableCICtor_Transition::CStringPool_MultipleTableCICtor_Transition(CUnitTestContext& aUTContext,
1197 TTransitionValidator& aValidator)
1198 : CTransitionType(KStringPoolMultipleTableCICtorTransition, aUTContext, aValidator)
1203 inline void CStringPool_MultipleTableCICtor_Transition::TransitMethodL()
1205 _LIT(KStringPoolMultipleTableCICtorTransitMethod, "CStringPool::MultipleTableCICtor transition");
1206 Context().DataLogger().LogInformation(KStringPoolMultipleTableCICtorTransitMethod);
1208 Context().iStringPool.OpenL();
1210 _LIT8(KStringA, "AnotherString");
1211 CleanupClosePushL(Context().iFF);
1212 Context().iFF=Context().iStringPool.OpenFStringL(KStringA); // Dynamic string
1213 CleanupStack::Pop(); // iFF
1216 Context().iTestTable=Short::Table;
1217 Context().iStringPool.OpenL(Context().iTestTable);
1219 Context().iTestTable2=Short3::Table; // Non-duplicate table
1220 Context().iStringPool.OpenL(Context().iTestTable2);
1222 Context().iTestTable3=Short2::Table;
1223 Context().iStringPool.OpenL(Context().iTestTable3);
1225 Context().iTestTable4=Short4::Table; // Duplicate of a duplicate table
1226 Context().iStringPool.OpenL(Context().iTestTable4);
1227 Context().iStringPool.OpenL(Context().iTestTable4); // Add same table twice
1229 Context().iFA=Context().iStringPool.StringF(Short::EString, Context().iTestTable); // String
1230 Context().iFB=Context().iStringPool.StringF(Short2::EString, Context().iTestTable3); // String
1231 Context().iFC=Context().iStringPool.StringF(Short3::EString3, Context().iTestTable2); // String3, non-duplicate
1232 Context().iFD=Context().iStringPool.StringF(Short4::EAnotherString , Context().iTestTable4); // AnotherString3 duplicate of a duplicate
1234 Context().iFE=Context().iStringPool.StringF(Short2::EAnotherString , Context().iTestTable3); // Duplicate of dynamic string
1236 Context().iIndex1=Context().iFA.Index(Context().iTestTable); // 0
1237 Context().iIndex2=Context().iFB.Index(Context().iTestTable3); // 1
1238 Context().iIndex3=Context().iFC.Index(Context().iTestTable2); // 1
1239 Context().iIndex4=Context().iFD.Index(Context().iTestTable4); // 0
1244 inline CStringPool_UnitTestContext& CStringPool_MultipleTableCICtor_Transition::Context() const
1246 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1251 // ______________________________________________________________________________
1253 _LIT(KStringPoolMutlipleCICeqCTransition,"CStringPool_MutlipleCICeqC_Transition");
1255 inline CStringPool_MutlipleCICeqC_Transition::CStringPool_MutlipleCICeqC_Transition(CUnitTestContext& aUTContext,
1256 TTransitionValidator& aValidator)
1257 : CTransitionType(KStringPoolMutlipleCICeqCTransition, aUTContext, aValidator)
1262 inline void CStringPool_MutlipleCICeqC_Transition::TransitMethodL()
1264 _LIT(KStringPoolMutlipleCICeqCTransitMethod, "CStringPool::MutlipleCICeqC transition");
1265 Context().DataLogger().LogInformation(KStringPoolMutlipleCICeqCTransitMethod);
1266 _LIT8(KStringC, "String3");
1267 Context().iResult = (Context().iFC.DesC().CompareF(KStringC))==0;
1270 inline CStringPool_UnitTestContext& CStringPool_MutlipleCICeqC_Transition::Context() const
1272 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1276 // ______________________________________________________________________________
1278 _LIT(KStringPoolMultipleCIStringToIndexTransition,"CStringPool_MultipleCIStringToIndex_Transition");
1280 inline CStringPool_MultipleCIStringToIndex_Transition::CStringPool_MultipleCIStringToIndex_Transition(CUnitTestContext& aUTContext,
1281 TTransitionValidator& aValidator)
1282 : CTransitionType(KStringPoolMultipleCIStringToIndexTransition, aUTContext, aValidator)
1287 inline void CStringPool_MultipleCIStringToIndex_Transition::TransitMethodL()
1289 _LIT(KStringPoolMultipleCIStringToIndexTransitMethod, "CStringPool::MultipleCIStringToIndex transition");
1290 Context().DataLogger().LogInformation(KStringPoolMultipleCIStringToIndexTransitMethod);
1291 if (Context().iIndex1==0 && Context().iIndex2==1 && Context().iIndex3==1 && Context().iIndex4==0)
1292 Context().iResult = ETrue;
1294 Context().iResult = EFalse;
1297 inline CStringPool_UnitTestContext& CStringPool_MultipleCIStringToIndex_Transition::Context() const
1299 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1303 // ______________________________________________________________________________
1305 _LIT(KStringPoolMultipleCIDynamicStringTransition,"CStringPool_MultipleCIDynamicString_Transition");
1307 inline CStringPool_MultipleCIDynamicString_Transition::CStringPool_MultipleCIDynamicString_Transition(CUnitTestContext& aUTContext,
1308 TTransitionValidator& aValidator)
1309 : CTransitionType(KStringPoolMultipleCIDynamicStringTransition, aUTContext, aValidator)
1314 inline void CStringPool_MultipleCIDynamicString_Transition::TransitMethodL()
1316 _LIT(KStringPoolMultipleCIDynamicStringTransitMethod, "CStringPool::MultipleCIDynamicString transition");
1317 Context().DataLogger().LogInformation(KStringPoolMultipleCIDynamicStringTransitMethod);
1318 Context().iResult = Context().iFE==Context().iFF;
1321 inline CStringPool_UnitTestContext& CStringPool_MultipleCIDynamicString_Transition::Context() const
1323 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1326 // ______________________________________________________________________________
1328 _LIT(KStringPoolMultipleCIIndexToStringDynamicTransition,"CStringPool_MultipleCIIndexToStringDynamic_Transition");
1330 inline CStringPool_MultipleCIIndexToStringDynamic_Transition::CStringPool_MultipleCIIndexToStringDynamic_Transition(CUnitTestContext& aUTContext,
1331 TTransitionValidator& aValidator)
1332 : CTransitionType(KStringPoolMultipleCIIndexToStringDynamicTransition, aUTContext, aValidator)
1337 inline void CStringPool_MultipleCIIndexToStringDynamic_Transition::TransitMethodL()
1339 _LIT(KStringPoolMultipleCIIndexToStringDynamicTransitMethod, "CStringPool::MultipleCIIndexToStringDynamic transition");
1340 Context().DataLogger().LogInformation(KStringPoolMultipleCIIndexToStringDynamicTransitMethod);
1341 _LIT8(KStringE, "AnotherString");
1342 Context().iResult = (Context().iFE.DesC().CompareF(KStringE))==0;
1345 inline CStringPool_UnitTestContext& CStringPool_MultipleCIIndexToStringDynamic_Transition::Context() const
1347 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1351 // For case sensitive
1354 // ______________________________________________________________________________
1358 Comments : Transition test of the StringPool::MultipleTableCSCtor method.
1360 class CStringPool_MultipleTableCSCtor_Transition : public CTransitionType
1364 @fn CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext,
1365 TTransitionValidator& aValidator)
1366 Intended Usage : Standard c'tor method.
1367 Error Condition : None.
1369 @param aUTContext The context this transition is operating in.
1370 @param aValidator Used for checking the pre & post conditions of the test object.
1372 @post CStringPool_MultipleTableCSCtor_Transition is fully constructed.
1374 CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext,
1375 TTransitionValidator& aValidator);
1377 @fn TransitMethodL()
1378 Intended Usage : To execute the StringPool::MultipleTableCSCtor method for the test harness.
1379 Error Condition : Leaves with an error code.
1380 @leave KErrNoMemory, (@see StringPool::MultipleTableCSCtor)
1383 @pre CStringPool_MultipleTableCSCtor_Transition is fully constructed.
1384 @post No change in the CStringPool_MultipleTableCSCtor_Transition apart
1385 from iStringPool, which may have changed state.
1386 (@see StringPool::MultipleTableCSCtor post-condition) for iStringPool's new state.
1388 inline void TransitMethodL();
1392 Intended Usage : To provide access to the unit test context cast to the correct type.
1393 Error Condition : None.
1395 @return The unit test context cast to a CStringPool_UnitTestContext
1396 @pre iUTContext is a valid CStringPool_UnitTestContext.
1397 @post No change in the CStringPool_MultipleTableCSCtor_Transition
1399 inline CStringPool_UnitTestContext& Context() const;
1400 }; // CStringPool_MultipleTableCSCtor_Transition
1402 // ______________________________________________________________________________
1404 _LIT(KStringPoolMultipleTableCSCtorTransition,"CStringPool_MultipleTableCSCtor_Transition");
1406 inline CStringPool_MultipleTableCSCtor_Transition::CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext,
1407 TTransitionValidator& aValidator)
1408 : CTransitionType(KStringPoolMultipleTableCSCtorTransition, aUTContext, aValidator)
1413 inline void CStringPool_MultipleTableCSCtor_Transition::TransitMethodL()
1415 _LIT(KStringPoolMultipleTableCSCtorTransitMethod, "CStringPool::MultipleTableCSCtor transition");
1416 Context().DataLogger().LogInformation(KStringPoolMultipleTableCSCtorTransitMethod);
1418 Context().iStringPool.OpenL();
1420 _LIT8(KStringA, "AnotherString");
1421 CleanupClosePushL(Context().iF);
1422 Context().iF=Context().iStringPool.OpenStringL(KStringA); // Dynamic string
1423 CleanupStack::Pop(); // iF
1426 Context().iTestTable=ShortCS::Table;
1427 Context().iStringPool.OpenL(Context().iTestTable);
1429 Context().iTestTable2=ShortCS3::Table; // Non-duplicate table
1430 Context().iStringPool.OpenL(Context().iTestTable2);
1432 Context().iTestTable3=ShortCS2::Table;
1433 Context().iStringPool.OpenL(Context().iTestTable3);
1435 Context().iTestTable4=ShortCS4::Table; // Duplicate of a duplicate table
1436 Context().iStringPool.OpenL(Context().iTestTable4);
1437 Context().iStringPool.OpenL(Context().iTestTable4); // Add same table twice
1439 Context().iA=Context().iStringPool.String(ShortCS::EString, Context().iTestTable); // String
1440 Context().iB=Context().iStringPool.String(ShortCS2::EString, Context().iTestTable3); // String
1441 Context().iC=Context().iStringPool.String(ShortCS3::EString3, Context().iTestTable2); // String3, non-duplicate
1442 Context().iD=Context().iStringPool.String(ShortCS4::EAnotherString , Context().iTestTable4); // AnotherString3 duplicate of a duplicate
1444 Context().iE=Context().iStringPool.String(ShortCS2::EAnotherString , Context().iTestTable3); // Duplicate of dynamic string
1446 Context().iIndex1=Context().iA.Index(Context().iTestTable); // 0
1447 Context().iIndex2=Context().iB.Index(Context().iTestTable3); // 1
1448 Context().iIndex3=Context().iC.Index(Context().iTestTable2); // 1
1449 Context().iIndex4=Context().iD.Index(Context().iTestTable4); // 2
1454 inline CStringPool_UnitTestContext& CStringPool_MultipleTableCSCtor_Transition::Context() const
1456 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1460 // ______________________________________________________________________________
1462 _LIT(KStringPoolMutlipleCSCeqCTransition,"CStringPool_MutlipleCSCeqC_Transition");
1464 inline CStringPool_MutlipleCSCeqC_Transition::CStringPool_MutlipleCSCeqC_Transition(CUnitTestContext& aUTContext,
1465 TTransitionValidator& aValidator)
1466 : CTransitionType(KStringPoolMutlipleCSCeqCTransition, aUTContext, aValidator)
1471 inline void CStringPool_MutlipleCSCeqC_Transition::TransitMethodL()
1473 _LIT(KStringPoolMutlipleCSCeqCTransitMethod, "CStringPool::MutlipleCSCeqC transition");
1474 Context().DataLogger().LogInformation(KStringPoolMutlipleCSCeqCTransitMethod);
1475 _LIT8(KStringC, "String3");
1476 Context().iResult = (Context().iC.DesC().CompareF(KStringC))==0;
1479 inline CStringPool_UnitTestContext& CStringPool_MutlipleCSCeqC_Transition::Context() const
1481 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1485 // ______________________________________________________________________________
1487 _LIT(KStringPoolMultipleCSStringToIndexTransition,"CStringPool_MultipleCSStringToIndex_Transition");
1489 inline CStringPool_MultipleCSStringToIndex_Transition::CStringPool_MultipleCSStringToIndex_Transition(CUnitTestContext& aUTContext,
1490 TTransitionValidator& aValidator)
1491 : CTransitionType(KStringPoolMultipleCSStringToIndexTransition, aUTContext, aValidator)
1496 inline void CStringPool_MultipleCSStringToIndex_Transition::TransitMethodL()
1498 _LIT(KStringPoolMultipleCSStringToIndexTransitMethod, "CStringPool::MultipleCSStringToIndex transition");
1499 Context().DataLogger().LogInformation(KStringPoolMultipleCSStringToIndexTransitMethod);
1500 if (Context().iIndex1==0 && Context().iIndex2==1 && Context().iIndex3==1 && Context().iIndex4==2)
1501 Context().iResult = ETrue;
1503 Context().iResult = EFalse;
1506 inline CStringPool_UnitTestContext& CStringPool_MultipleCSStringToIndex_Transition::Context() const
1508 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1512 // ______________________________________________________________________________
1514 _LIT(KStringPoolMultipleCSDynamicStringTransition,"CStringPool_MultipleCSDynamicString_Transition");
1516 inline CStringPool_MultipleCSDynamicString_Transition::CStringPool_MultipleCSDynamicString_Transition(CUnitTestContext& aUTContext,
1517 TTransitionValidator& aValidator)
1518 : CTransitionType(KStringPoolMultipleCSDynamicStringTransition, aUTContext, aValidator)
1523 inline void CStringPool_MultipleCSDynamicString_Transition::TransitMethodL()
1525 _LIT(KStringPoolMultipleCSDynamicStringTransitMethod, "CStringPool::MultipleCSDynamicString transition");
1526 Context().DataLogger().LogInformation(KStringPoolMultipleCSDynamicStringTransitMethod);
1527 Context().iResult = Context().iE==Context().iF;
1530 inline CStringPool_UnitTestContext& CStringPool_MultipleCSDynamicString_Transition::Context() const
1532 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1536 // ______________________________________________________________________________
1538 _LIT(KStringPoolMultipleCSIndexToStringDynamicTransition,"CStringPool_MultipleCSIndexToStringDynamic_Transition");
1540 inline CStringPool_MultipleCSIndexToStringDynamic_Transition::CStringPool_MultipleCSIndexToStringDynamic_Transition(CUnitTestContext& aUTContext,
1541 TTransitionValidator& aValidator)
1542 : CTransitionType(KStringPoolMultipleCSIndexToStringDynamicTransition, aUTContext, aValidator)
1547 inline void CStringPool_MultipleCSIndexToStringDynamic_Transition::TransitMethodL()
1549 _LIT(KStringPoolMultipleCSIndexToStringDynamicTransitMethod, "CStringPool::MultipleCSIndexToStringDynamic transition");
1550 Context().DataLogger().LogInformation(KStringPoolMultipleCSIndexToStringDynamicTransitMethod);
1551 _LIT8(KStringE, "AnotherString");
1552 Context().iResult = (Context().iE.DesC().CompareF(KStringE))==0;
1555 inline CStringPool_UnitTestContext& CStringPool_MultipleCSIndexToStringDynamic_Transition::Context() const
1557 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1561 // ______________________________________________________________________________
1563 _LIT(KStringPoolMultipleTableDtorTransition,"CStringPool_MultipleTableDtor_Transition");
1565 inline CStringPool_MultipleTableDtor_Transition::CStringPool_MultipleTableDtor_Transition(CUnitTestContext& aUTContext,
1566 TTransitionValidator& aValidator)
1567 : CTransitionType(KStringPoolMultipleTableDtorTransition, aUTContext, aValidator)
1572 inline void CStringPool_MultipleTableDtor_Transition::TransitMethodL()
1574 _LIT(KStringPoolMultipleTableDtorTransitMethod, "CStringPool::MultipleTableDtor transition");
1575 Context().DataLogger().LogInformation(KStringPoolMultipleTableDtorTransitMethod);
1576 Context().iA.Close();
1577 Context().iB.Close();
1578 Context().iC.Close();
1579 Context().iD.Close();
1580 Context().iE.Close();
1581 Context().iF.Close();
1583 Context().iFA.Close();
1584 Context().iFB.Close();
1585 Context().iFC.Close();
1586 Context().iFD.Close();
1587 Context().iFE.Close();
1588 Context().iFF.Close();
1590 Context().iStringPool.Close();
1593 inline CStringPool_UnitTestContext& CStringPool_MultipleTableDtor_Transition::Context() const
1595 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1598 // ______________________________________________________________________________
1600 _LIT(KStringPoolBEU55DJG3Transition,"CStringPool_BEU55DJG3_Transition");
1602 inline CStringPool_BEU55DJG3_Transition::CStringPool_BEU55DJG3_Transition(CUnitTestContext& aUTContext,
1603 TTransitionValidator& aValidator)
1604 : CTransitionType(KStringPoolBEU55DJG3Transition, aUTContext, aValidator)
1609 inline void CStringPool_BEU55DJG3_Transition::TransitMethodL()
1611 _LIT(KStringPoolBEU55DJG3TransitMethod, "CStringPool::BEU55DJG3 transition");
1612 _LIT(KMinus1, "The Index() function returns = KErrNotFound");
1613 _LIT(KOther, "The Index() function returns something != -1");
1614 Context().DataLogger().LogInformation(KStringPoolBEU55DJG3TransitMethod);
1616 result = Context().iEmptyOne.Index(Context().iTestTable);
1617 if (result == KErrNotFound)
1619 Context().iResult = 1; //ETrue
1620 Context().DataLogger().LogInformation(KMinus1);
1624 Context().iResult = 0 ;//EFalse
1625 Context().DataLogger().LogInformation(KOther);
1630 inline CStringPool_UnitTestContext& CStringPool_BEU55DJG3_Transition::Context() const
1632 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1635 // ______________________________________________________________________________
1637 _LIT(KStringPoolKRN56NDEZTransition,"CStringPool_KRN56NDEZ_Transition");
1639 inline CStringPool_KRN56NDEZ_Transition::CStringPool_KRN56NDEZ_Transition(CUnitTestContext& aUTContext,
1640 TTransitionValidator& aValidator)
1641 : CTransitionType(KStringPoolKRN56NDEZTransition, aUTContext, aValidator)
1646 inline void CStringPool_KRN56NDEZ_Transition::TransitMethodL()
1648 _LIT(KStringPoolKRN56NDEZTransitMethod, "CStringPool::KRN56NDEZ transition");
1649 _LIT(KTestOK,"\n Test Passed");
1650 _LIT(KTestFailed,"\nTest Failed");
1653 Context().DataLogger().LogInformation(KStringPoolKRN56NDEZTransitMethod);
1655 //Open 2 tables with some string duplicates and open them
1656 Context().iStringPool.OpenL(Short::Table);
1657 Context().iStringPool.OpenL(Short2::Table);
1659 Context().iFAString = Context().iStringPool.StringF(Short2::EString,Short2::Table);
1660 const TStringTable* originalTable= Context().iFAString.OriginalTableRef();
1662 Context().iFADuplicateString = Context().iStringPool.StringF(Short::EString,Short::Table);
1663 const TStringTable* ShortTable= Context().iFA.OriginalTableRef();
1666 if (ShortTable==originalTable)
1668 Context().iResult=ETrue;
1669 Context().DataLogger().LogInformation(KTestOK);
1673 Context().iResult=EFalse;
1674 Context().DataLogger().LogInformation(KTestFailed);
1679 inline CStringPool_UnitTestContext& CStringPool_KRN56NDEZ_Transition::Context() const
1681 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1684 // ______________________________________________________________________________
1686 _LIT(KStringPoolAPY57TEH3Transition,"CStringPool_APY57TEH3_Transition");
1688 inline CStringPool_APY57TEH3_Transition::CStringPool_APY57TEH3_Transition(CUnitTestContext& aUTContext,
1689 TTransitionValidator& aValidator)
1690 : CTransitionType(KStringPoolAPY57TEH3Transition, aUTContext, aValidator)
1695 inline void CStringPool_APY57TEH3_Transition::TransitMethodL()
1697 _LIT(KStringPoolAPY57TEH3TransitMethod, "CStringPool::APY57TEH3 transition");
1698 Context().DataLogger().LogInformation(KStringPoolAPY57TEH3TransitMethod);
1701 Context().iResult=(Context().iEmptyOne!=Context().iTFE);
1706 inline CStringPool_UnitTestContext& CStringPool_APY57TEH3_Transition::Context() const
1708 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);
1712 // ______________________________________________________________________________
1714 _LIT(KStringPoolHAD57SK27Transition,"CStringPool_HAD57SK27_Transition");
1716 inline CStringPool_HAD57SK27_Transition::CStringPool_HAD57SK27_Transition(CUnitTestContext& aUTContext,
1717 TTransitionValidator& aValidator)
1718 : CTransitionType(KStringPoolHAD57SK27Transition, aUTContext, aValidator)
1723 inline void CStringPool_HAD57SK27_Transition::TransitMethodL()
1725 _LIT(KStringPoolHAD57SK27TransitMethod, "CStringPool::HAD57SK27 transition");
1726 Context().DataLogger().LogInformation(KStringPoolHAD57SK27TransitMethod);
1729 // Create string pool and load HTTP static table
1734 _LIT8(KUndeletable_EX, "_ex");
1735 Context().iUndeletable_EX = pool.OpenStringL(KUndeletable_EX);
1737 _LIT8(KUndeletable_A," _a");
1738 Context().iUndeletable_A = pool.OpenStringL(KUndeletable_A());
1740 // Load SecurityPolicyProperties static table
1741 pool.OpenL(SecurityPolicyPluginStrings::Table);
1743 // Close strings opened
1744 Context().iUndeletable_EX.Close();
1745 Context().iUndeletable_A.Close();
1747 // Close the string pool
1749 //if at this point the m pool string pool closes fine .the test has passed
1750 _LIT(KTestHAD57SK27OK,"\n Defect HAD57SK27OK test : OK\n");
1751 Context().DataLogger().LogInformation(KTestHAD57SK27OK);
1752 Context().iResult=ETrue;
1756 inline CStringPool_UnitTestContext& CStringPool_HAD57SK27_Transition::Context() const
1758 return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext);