sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // The implementation of the transition classes upon the RStringPool class methods. sl@0: // sl@0: // sl@0: sl@0: #include "short.h" sl@0: #include "long.h" sl@0: #include "irrelevant.h" sl@0: #include "shortcs.h" sl@0: #include "longcs.h" sl@0: #include "irrelevantcs.h" sl@0: #include "short2.h" sl@0: #include "short3.h" sl@0: #include "short4.h" sl@0: #include "shortcs2.h" sl@0: #include "shortcs3.h" sl@0: #include "shortcs4.h" sl@0: #include "securitypolicypluginstrings.h" sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolNewLTransition,"CStringPool_NewL_Transition"); sl@0: sl@0: inline CStringPool_NewL_Transition::CStringPool_NewL_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolNewLTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_NewL_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolNewLTransitMethod, "CStringPool::NewL transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolNewLTransitMethod); sl@0: Context().iStringPool.OpenL(); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: Context().iInt = -1; sl@0: Context().iFint = -1; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_NewL_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolDtorTransition,"CStringPool_Dtor_Transition"); sl@0: sl@0: inline CStringPool_Dtor_Transition::CStringPool_Dtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolDtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_Dtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolDtorTransitMethod, "CStringPool::Dtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolDtorTransitMethod); sl@0: sl@0: Context().iA.Close(); sl@0: Context().iB.Close(); sl@0: Context().iD.Close(); sl@0: sl@0: Context().iFA.Close(); sl@0: Context().iFB.Close(); sl@0: Context().iFD.Close(); sl@0: sl@0: Context().iStringPool.Close(); sl@0: sl@0: sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Dtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // Add additional Transition class Implementations here... sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRStringPoolAeqATransition,"CRStringPool_AeqA_Transition"); sl@0: sl@0: inline CStringPool_AeqA_Transition::CStringPool_AeqA_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRStringPoolAeqATransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AeqA_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRStringPoolAeqATransitMethod, "CRStringPool::AeqA transition"); sl@0: Context().DataLogger().LogInformation(KRStringPoolAeqATransitMethod); sl@0: RString temp = Context().iA; sl@0: Context().iResult = Context().iA == temp;; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AeqA_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAneATransition,"CStringPool_AneA_Transition"); sl@0: sl@0: inline CStringPool_AneA_Transition::CStringPool_AneA_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAneATransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AneA_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAneATransitMethod, "CStringPool::AneA transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAneATransitMethod); sl@0: RString temp = Context().iA; sl@0: Context().iResult = Context().iA != temp;; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AneA_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAeqBTransition,"CStringPool_AeqB_Transition"); sl@0: sl@0: inline CStringPool_AeqB_Transition::CStringPool_AeqB_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAeqBTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AeqB_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAeqBTransitMethod, "CStringPool::AeqB transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAeqBTransitMethod); sl@0: Context().iResult = Context().iA == Context().iB; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AeqB_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAneBTransition,"CStringPool_AneB_Transition"); sl@0: sl@0: inline CStringPool_AneB_Transition::CStringPool_AneB_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAneBTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AneB_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAneBTransitMethod, "CStringPool::AneB transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAneBTransitMethod); sl@0: Context().iResult = Context().iA != Context().iB; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AneB_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAeqDTransition,"CStringPool_AeqD_Transition"); sl@0: sl@0: inline CStringPool_AeqD_Transition::CStringPool_AeqD_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAeqDTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AeqD_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAeqDTransitMethod, "CStringPool::AeqD transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAeqDTransitMethod); sl@0: Context().iResult = Context().iA == Context().iD; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AeqD_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAneDTransition,"CStringPool_AneD_Transition"); sl@0: sl@0: inline CStringPool_AneD_Transition::CStringPool_AneD_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAneDTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_AneD_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAneDTransitMethod, "CStringPool::AneD transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAneDTransitMethod); sl@0: Context().iResult = Context().iA != Context().iD; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_AneD_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolDescTransition,"CStringPool_Desc_Transition"); sl@0: sl@0: inline CStringPool_Desc_Transition::CStringPool_Desc_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolDescTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_Desc_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolDescTransitMethod, "CStringPool::Desc transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolDescTransitMethod); sl@0: Context().iResult = Context().iADes.Compare(Context().iA.DesC()); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Desc_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolCopyTransition,"CStringPool_Copy_Transition"); sl@0: sl@0: inline CStringPool_Copy_Transition::CStringPool_Copy_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolCopyTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_Copy_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolCopyTransitMethod, "CStringPool::Copy transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolCopyTransitMethod); sl@0: Context().iC = Context().iA.Copy(); sl@0: Context().iResult = Context().iA == Context().iC; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Copy_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolCDesCTransition,"CStringPool_CDesC_Transition"); sl@0: sl@0: inline CStringPool_CDesC_Transition::CStringPool_CDesC_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolCDesCTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_CDesC_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolCDesCTransitMethod, "CStringPool::CDesC transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolCDesCTransitMethod); sl@0: Context().iResult = Context().iADes.Compare(Context().iC.DesC()); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_CDesC_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolCloseTransition,"CStringPool_Close_Transition"); sl@0: sl@0: inline CStringPool_Close_Transition::CStringPool_Close_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolCloseTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_Close_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolCloseTransitMethod, "CStringPool::Close transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolCloseTransitMethod); sl@0: Context().iC.Close(); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Close_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolIntTransition,"CStringPool_Int_Transition"); sl@0: sl@0: inline CStringPool_Int_Transition::CStringPool_Int_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolIntTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_Int_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolIntTransitMethod, "aaCStringPool::Int transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolIntTransitMethod); sl@0: Context().iResult = Context().iTE.Index(Context().iTestTable) == Context().iInt; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Int_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolStringTokenTransition,"CStringPool_StringToken_Transition"); sl@0: sl@0: inline CStringPool_StringToken_Transition::CStringPool_StringToken_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolStringTokenTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_StringToken_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolStringTokenTransitMethod, "CStringPool::StringToken transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolStringTokenTransitMethod); sl@0: RStringToken t = Context().iA; sl@0: Context().iC = Context().iStringPool.String(t); sl@0: Context().iResult = Context().iC == Context().iA; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_StringToken_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KRstringPoolFAeqATransition,"CRStringPool_AeqA_Transition"); sl@0: sl@0: inline CStringPool_FAeqA_Transition::CStringPool_FAeqA_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KRstringPoolFAeqATransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAeqA_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KRstringPoolFAeqATransitMethod, "CRStringPool::AeqA transition"); sl@0: Context().DataLogger().LogInformation(KRstringPoolFAeqATransitMethod); sl@0: RStringF temp = Context().iFA; sl@0: Context().iResult = Context().iFA == temp;; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAeqA_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFAneATransition,"CStringPool_FAneA_Transition"); sl@0: sl@0: inline CStringPool_FAneA_Transition::CStringPool_FAneA_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFAneATransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAneA_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFAneATransitMethod, "CStringPoolF::AneA transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFAneATransitMethod); sl@0: RStringF temp = Context().iFA; sl@0: Context().iResult = Context().iFA != temp;; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAneA_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFAeqBTransition,"CStringPool_FAeqB_Transition"); sl@0: sl@0: inline CStringPool_FAeqB_Transition::CStringPool_FAeqB_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFAeqBTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAeqB_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFAeqBTransitMethod, "CStringPoolF::AeqB transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFAeqBTransitMethod); sl@0: Context().iResult = Context().iFA == Context().iFB; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAeqB_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFAneBTransition,"CStringPool_FAneB_Transition"); sl@0: sl@0: inline CStringPool_FAneB_Transition::CStringPool_FAneB_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFAneBTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAneB_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFAneBTransitMethod, "CStringPoolF::AneB transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFAneBTransitMethod); sl@0: Context().iResult = Context().iFA != Context().iFB; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAneB_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFAeqDTransition,"CStringPool_FAeqD_Transition"); sl@0: sl@0: inline CStringPool_FAeqD_Transition::CStringPool_FAeqD_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFAeqDTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAeqD_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFAeqDTransitMethod, "CStringPoolF::AeqD transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFAeqDTransitMethod); sl@0: Context().iResult = Context().iFA == Context().iFD; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAeqD_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFAneDTransition,"CStringPool_FAneD_Transition"); sl@0: sl@0: inline CStringPool_FAneD_Transition::CStringPool_FAneD_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFAneDTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FAneD_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFAneDTransitMethod, "CStringPoolF::AneD transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFAneDTransitMethod); sl@0: Context().iResult = Context().iFA != Context().iFD; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FAneD_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFDescTransition,"CStringPool_FDesc_Transition"); sl@0: sl@0: inline CStringPool_FDesc_Transition::CStringPool_FDesc_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFDescTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FDesc_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFDescTransitMethod, "CStringPoolF::Desc transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFDescTransitMethod); sl@0: Context().iResult = Context().iADes.Compare(Context().iFA.DesC()); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FDesc_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFCopyTransition,"CStringPool_FCopy_Transition"); sl@0: sl@0: inline CStringPool_FCopy_Transition::CStringPool_FCopy_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFCopyTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FCopy_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFCopyTransitMethod, "CStringPoolF::Copy transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFCopyTransitMethod); sl@0: Context().iFC = Context().iFA.Copy(); sl@0: Context().iResult = Context().iFA == Context().iFC; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FCopy_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFCDesCTransition,"CStringPool_FCDesC_Transition"); sl@0: sl@0: inline CStringPool_FCDesC_Transition::CStringPool_FCDesC_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFCDesCTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FCDesC_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFCDesCTransitMethod, "CStringPoolF::CDesC transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFCDesCTransitMethod); sl@0: Context().iResult = Context().iADes.Compare(Context().iFC.DesC()); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FCDesC_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFCloseTransition,"CStringPool_FClose_Transition"); sl@0: sl@0: inline CStringPool_FClose_Transition::CStringPool_FClose_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFCloseTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FClose_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFCloseTransitMethod, "CStringPoolF::Close transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFCloseTransitMethod); sl@0: Context().iFC.Close(); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FClose_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFIntTransition,"CStringPool_FInt_Transition"); sl@0: sl@0: inline CStringPool_FInt_Transition::CStringPool_FInt_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFIntTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FInt_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFIntTransitMethod, "CStringPoolF::Int transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFIntTransitMethod); sl@0: Context().iResult = Context().iTFE.Index(Context().iTestTable) == Context().iFint; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FInt_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolFStringTokenTransition,"CStringPool_FStringToken_Transition"); sl@0: sl@0: inline CStringPool_FStringToken_Transition::CStringPool_FStringToken_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolFStringTokenTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_FStringToken_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolFStringTokenTransitMethod, "CStringPoolF::StringToken transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolFStringTokenTransitMethod); sl@0: RStringTokenF t = Context().iFA; sl@0: Context().iFC = Context().iStringPool.StringF(t); sl@0: Context().iResult = Context().iFC == Context().iFA; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_FStringToken_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolSmallCtorTransition,"CStringPool_ShortCtor_Transition"); sl@0: sl@0: inline CStringPool_ShortCtor_Transition::CStringPool_ShortCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolSmallCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_ShortCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolSmallCtorTransitMethod, "CStringPool::SmallCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolSmallCtorTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=Short::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: CleanupClosePushL(Context().iA); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: CleanupClosePushL(Context().iB); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: CleanupClosePushL(Context().iD); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: CleanupClosePushL(Context().iFA); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: CleanupClosePushL(Context().iFB); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: CleanupClosePushL(Context().iFD); sl@0: sl@0: sl@0: // Context().iTE = p.String(0,Context().iTestTable); sl@0: Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: // Create an empty string sl@0: Context().iEmptyOne = RStringF() ; sl@0: sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: Context().iInt = 0; sl@0: Context().iFint = 0; sl@0: Context().iNotFound = -1; sl@0: CleanupStack::Pop(6); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_ShortCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolIrrelevantCtorTransition,"CStringPool_IrrelevantCtor_Transition"); sl@0: sl@0: inline CStringPool_IrrelevantCtor_Transition::CStringPool_IrrelevantCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KStringPoolIrrelevantCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_IrrelevantCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolIrrelevantCtorTransitMethod, "CStringPool::IrrelevantCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolIrrelevantCtorTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=Irrelevant::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: sl@0: // Context().iTE = p.String(0,Context().iTestTable); sl@0: Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: sl@0: Context().iFint = 0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_IrrelevantCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolLongCtorTransition,"CStringPool_LongCtor_Transition"); sl@0: sl@0: inline CStringPool_LongCtor_Transition::CStringPool_LongCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransition(KStringPoolLongCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_LongCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolLongCtorTransitMethod, "CStringPool::LongCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolLongCtorTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=Long::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: sl@0: // Context().iTE = p.String(0,Context().iTestTable); sl@0: Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: Context().iInt = 0; sl@0: Context().iFint = 0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_LongCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: //____________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolStringF_Index_TableTransition,"CStringPool_StringF_Index_Table_Transition"); sl@0: sl@0: inline CStringPool_StringF_Index_Table_Transition::CStringPool_StringF_Index_Table_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolStringF_Index_TableTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_StringF_Index_Table_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolStringF_Index_TableTransitMethod, "CStringPool::StringF_Index_Table transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolStringF_Index_TableTransitMethod); sl@0: sl@0: Context().iResult = Context().iTFE == Context().iFA; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_StringF_Index_Table_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolshortCSCtorTransition,"CStringPool_ShortCSCtor_Transition"); sl@0: sl@0: inline CStringPool_ShortCSCtor_Transition::CStringPool_ShortCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolshortCSCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_ShortCSCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolshortCSCtorTransitMethod, "CStringPool::ShortCSCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolshortCSCtorTransitMethod); sl@0: sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=ShortCS::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: CleanupClosePushL(Context().iA); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: CleanupClosePushL(Context().iB); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: CleanupClosePushL(Context().iD); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: CleanupClosePushL(Context().iFA); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: CleanupClosePushL(Context().iFB); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: CleanupClosePushL(Context().iFD); sl@0: sl@0: Context().iTE = p.String(0,Context().iTestTable); sl@0: // Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: sl@0: Context().iInt = 0; sl@0: CleanupStack::Pop(6); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_ShortCSCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolString_Index_TableTransition,"CStringPool_String_Index_Table_Transition"); sl@0: sl@0: inline CStringPool_String_Index_Table_Transition::CStringPool_String_Index_Table_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolString_Index_TableTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_String_Index_Table_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolString_Index_TableTransitMethod, "CStringPool::String_Index_Table transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolString_Index_TableTransitMethod); sl@0: sl@0: Context().iResult = Context().iTE == Context().iA; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_String_Index_Table_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolIrrelevantCSCtorTransition,"CStringPool_IrrelevantCSCtor_Transition"); sl@0: sl@0: inline CStringPool_IrrelevantCSCtor_Transition::CStringPool_IrrelevantCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolIrrelevantCSCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_IrrelevantCSCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolIrrelevantCSCtorTransitMethod, "CStringPool::IrrelevantCSCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolIrrelevantCSCtorTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=IrrelevantCS::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: sl@0: Context().iTE = p.String(0,Context().iTestTable); sl@0: // Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: sl@0: Context().iFint = 0; sl@0: Context().iInt = 0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_IrrelevantCSCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolLargeCSCtorTransition,"CStringPool_LargeCSCtor_Transition"); sl@0: sl@0: inline CStringPool_LargeCSCtor_Transition::CStringPool_LargeCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolLargeCSCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_LargeCSCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolLargeCSCtorTransitMethod, "CStringPool::LargeCSCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolLargeCSCtorTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=LongCS::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: RStringPool p = Context().iStringPool; sl@0: sl@0: _LIT8(KStringA, "String"); sl@0: _LIT8(KStringB, "Another String"); sl@0: _LIT8(KStringD, "String"); sl@0: sl@0: _LIT8(KStringFA, "String"); sl@0: _LIT8(KStringFB, "Another String"); sl@0: _LIT8(KStringFD, "sTRING"); sl@0: sl@0: Context().iA = p.OpenStringL(KStringA()); sl@0: Context().iB = p.OpenStringL(KStringB()); sl@0: Context().iD = p.OpenStringL(KStringD()); sl@0: sl@0: Context().iFA = p.OpenFStringL(KStringFA()); sl@0: Context().iFB = p.OpenFStringL(KStringFB()); sl@0: Context().iFD = p.OpenFStringL(KStringFD()); sl@0: sl@0: Context().iTE = p.String(0,Context().iTestTable); sl@0: // Context().iTFE = p.StringF(0,Context().iTestTable); sl@0: sl@0: Context().iADes.Set(KStringA); sl@0: Context().iBDes.Set(KStringB); sl@0: Context().iDDes.Set(KStringD); sl@0: sl@0: Context().iFADes.Set(KStringFA); sl@0: Context().iFBDes.Set(KStringFB); sl@0: Context().iFDDes.Set(KStringFD); sl@0: sl@0: Context().iInt = 0; sl@0: Context().iFint = 0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_LargeCSCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolShortCtor_CBTransition,"CStringPool_Short_CB_Transition"); sl@0: sl@0: inline CStringPool_Short_CB_Transition::CStringPool_Short_CB_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolShortCtor_CBTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: inline void CStringPool_Short_CB_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolShortCtor_CBTransitMethod, "CStringPool::ShortCtor_CB transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolShortCtor_CBTransitMethod); sl@0: sl@0: //Set the table used in this test sl@0: Context().iTestTable=Short::Table; sl@0: sl@0: Context().iMyExtObj.a=0; sl@0: Context().iMyExtObj2.a=0; sl@0: Context().iMyExtObj3.a=0; sl@0: Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj); sl@0: CleanupClosePushL(Context().iStringPool); sl@0: Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj2); sl@0: Context().iStringPool.OpenL(Context().iTestTable,Context().iMyExtObj3); sl@0: Context().iStringPool.Close(); sl@0: Context().iResult= (Context().iMyExtObj.a) && (Context().iMyExtObj2.a)&&(Context().iMyExtObj3.a); sl@0: CleanupStack::Pop();//Context().iStringPool sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_Short_CB_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleTableCICtorTransition,"CStringPool_MultipleTableCICtor_Transition"); sl@0: sl@0: inline CStringPool_MultipleTableCICtor_Transition::CStringPool_MultipleTableCICtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleTableCICtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleTableCICtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleTableCICtorTransitMethod, "CStringPool::MultipleTableCICtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleTableCICtorTransitMethod); sl@0: sl@0: Context().iStringPool.OpenL(); sl@0: sl@0: _LIT8(KStringA, "AnotherString"); sl@0: CleanupClosePushL(Context().iFF); sl@0: Context().iFF=Context().iStringPool.OpenFStringL(KStringA); // Dynamic string sl@0: CleanupStack::Pop(); // iFF sl@0: sl@0: sl@0: Context().iTestTable=Short::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: sl@0: Context().iTestTable2=Short3::Table; // Non-duplicate table sl@0: Context().iStringPool.OpenL(Context().iTestTable2); sl@0: sl@0: Context().iTestTable3=Short2::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable3); sl@0: sl@0: Context().iTestTable4=Short4::Table; // Duplicate of a duplicate table sl@0: Context().iStringPool.OpenL(Context().iTestTable4); sl@0: Context().iStringPool.OpenL(Context().iTestTable4); // Add same table twice sl@0: sl@0: Context().iFA=Context().iStringPool.StringF(Short::EString, Context().iTestTable); // String sl@0: Context().iFB=Context().iStringPool.StringF(Short2::EString, Context().iTestTable3); // String sl@0: Context().iFC=Context().iStringPool.StringF(Short3::EString3, Context().iTestTable2); // String3, non-duplicate sl@0: Context().iFD=Context().iStringPool.StringF(Short4::EAnotherString , Context().iTestTable4); // AnotherString3 duplicate of a duplicate sl@0: sl@0: Context().iFE=Context().iStringPool.StringF(Short2::EAnotherString , Context().iTestTable3); // Duplicate of dynamic string sl@0: sl@0: Context().iIndex1=Context().iFA.Index(Context().iTestTable); // 0 sl@0: Context().iIndex2=Context().iFB.Index(Context().iTestTable3); // 1 sl@0: Context().iIndex3=Context().iFC.Index(Context().iTestTable2); // 1 sl@0: Context().iIndex4=Context().iFD.Index(Context().iTestTable4); // 0 sl@0: sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleTableCICtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMutlipleCICeqCTransition,"CStringPool_MutlipleCICeqC_Transition"); sl@0: sl@0: inline CStringPool_MutlipleCICeqC_Transition::CStringPool_MutlipleCICeqC_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMutlipleCICeqCTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MutlipleCICeqC_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMutlipleCICeqCTransitMethod, "CStringPool::MutlipleCICeqC transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMutlipleCICeqCTransitMethod); sl@0: _LIT8(KStringC, "String3"); sl@0: Context().iResult = (Context().iFC.DesC().CompareF(KStringC))==0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MutlipleCICeqC_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCIStringToIndexTransition,"CStringPool_MultipleCIStringToIndex_Transition"); sl@0: sl@0: inline CStringPool_MultipleCIStringToIndex_Transition::CStringPool_MultipleCIStringToIndex_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCIStringToIndexTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCIStringToIndex_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCIStringToIndexTransitMethod, "CStringPool::MultipleCIStringToIndex transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCIStringToIndexTransitMethod); sl@0: if (Context().iIndex1==0 && Context().iIndex2==1 && Context().iIndex3==1 && Context().iIndex4==0) sl@0: Context().iResult = ETrue; sl@0: else sl@0: Context().iResult = EFalse; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCIStringToIndex_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCIDynamicStringTransition,"CStringPool_MultipleCIDynamicString_Transition"); sl@0: sl@0: inline CStringPool_MultipleCIDynamicString_Transition::CStringPool_MultipleCIDynamicString_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCIDynamicStringTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCIDynamicString_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCIDynamicStringTransitMethod, "CStringPool::MultipleCIDynamicString transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCIDynamicStringTransitMethod); sl@0: Context().iResult = Context().iFE==Context().iFF; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCIDynamicString_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCIIndexToStringDynamicTransition,"CStringPool_MultipleCIIndexToStringDynamic_Transition"); sl@0: sl@0: inline CStringPool_MultipleCIIndexToStringDynamic_Transition::CStringPool_MultipleCIIndexToStringDynamic_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCIIndexToStringDynamicTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCIIndexToStringDynamic_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCIIndexToStringDynamicTransitMethod, "CStringPool::MultipleCIIndexToStringDynamic transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCIIndexToStringDynamicTransitMethod); sl@0: _LIT8(KStringE, "AnotherString"); sl@0: Context().iResult = (Context().iFE.DesC().CompareF(KStringE))==0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCIIndexToStringDynamic_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // For case sensitive sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: /** sl@0: @internalComponent sl@0: Comments : Transition test of the StringPool::MultipleTableCSCtor method. sl@0: */ sl@0: class CStringPool_MultipleTableCSCtor_Transition : public CTransitionType sl@0: { sl@0: public: sl@0: /** sl@0: @fn CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: Intended Usage : Standard c'tor method. sl@0: Error Condition : None. sl@0: @since 7.0 sl@0: @param aUTContext The context this transition is operating in. sl@0: @param aValidator Used for checking the pre & post conditions of the test object. sl@0: @pre None. sl@0: @post CStringPool_MultipleTableCSCtor_Transition is fully constructed. sl@0: */ sl@0: CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator); sl@0: /** sl@0: @fn TransitMethodL() sl@0: Intended Usage : To execute the StringPool::MultipleTableCSCtor method for the test harness. sl@0: Error Condition : Leaves with an error code. sl@0: @leave KErrNoMemory, (@see StringPool::MultipleTableCSCtor) sl@0: @since 7.0 sl@0: @return None sl@0: @pre CStringPool_MultipleTableCSCtor_Transition is fully constructed. sl@0: @post No change in the CStringPool_MultipleTableCSCtor_Transition apart sl@0: from iStringPool, which may have changed state. sl@0: (@see StringPool::MultipleTableCSCtor post-condition) for iStringPool's new state. sl@0: */ sl@0: inline void TransitMethodL(); sl@0: sl@0: /** sl@0: @fn Context() const sl@0: Intended Usage : To provide access to the unit test context cast to the correct type. sl@0: Error Condition : None. sl@0: @since 7.0 sl@0: @return The unit test context cast to a CStringPool_UnitTestContext sl@0: @pre iUTContext is a valid CStringPool_UnitTestContext. sl@0: @post No change in the CStringPool_MultipleTableCSCtor_Transition sl@0: */ sl@0: inline CStringPool_UnitTestContext& Context() const; sl@0: }; // CStringPool_MultipleTableCSCtor_Transition sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleTableCSCtorTransition,"CStringPool_MultipleTableCSCtor_Transition"); sl@0: sl@0: inline CStringPool_MultipleTableCSCtor_Transition::CStringPool_MultipleTableCSCtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleTableCSCtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleTableCSCtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleTableCSCtorTransitMethod, "CStringPool::MultipleTableCSCtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleTableCSCtorTransitMethod); sl@0: sl@0: Context().iStringPool.OpenL(); sl@0: sl@0: _LIT8(KStringA, "AnotherString"); sl@0: CleanupClosePushL(Context().iF); sl@0: Context().iF=Context().iStringPool.OpenStringL(KStringA); // Dynamic string sl@0: CleanupStack::Pop(); // iF sl@0: sl@0: sl@0: Context().iTestTable=ShortCS::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable); sl@0: sl@0: Context().iTestTable2=ShortCS3::Table; // Non-duplicate table sl@0: Context().iStringPool.OpenL(Context().iTestTable2); sl@0: sl@0: Context().iTestTable3=ShortCS2::Table; sl@0: Context().iStringPool.OpenL(Context().iTestTable3); sl@0: sl@0: Context().iTestTable4=ShortCS4::Table; // Duplicate of a duplicate table sl@0: Context().iStringPool.OpenL(Context().iTestTable4); sl@0: Context().iStringPool.OpenL(Context().iTestTable4); // Add same table twice sl@0: sl@0: Context().iA=Context().iStringPool.String(ShortCS::EString, Context().iTestTable); // String sl@0: Context().iB=Context().iStringPool.String(ShortCS2::EString, Context().iTestTable3); // String sl@0: Context().iC=Context().iStringPool.String(ShortCS3::EString3, Context().iTestTable2); // String3, non-duplicate sl@0: Context().iD=Context().iStringPool.String(ShortCS4::EAnotherString , Context().iTestTable4); // AnotherString3 duplicate of a duplicate sl@0: sl@0: Context().iE=Context().iStringPool.String(ShortCS2::EAnotherString , Context().iTestTable3); // Duplicate of dynamic string sl@0: sl@0: Context().iIndex1=Context().iA.Index(Context().iTestTable); // 0 sl@0: Context().iIndex2=Context().iB.Index(Context().iTestTable3); // 1 sl@0: Context().iIndex3=Context().iC.Index(Context().iTestTable2); // 1 sl@0: Context().iIndex4=Context().iD.Index(Context().iTestTable4); // 2 sl@0: sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleTableCSCtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMutlipleCSCeqCTransition,"CStringPool_MutlipleCSCeqC_Transition"); sl@0: sl@0: inline CStringPool_MutlipleCSCeqC_Transition::CStringPool_MutlipleCSCeqC_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMutlipleCSCeqCTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MutlipleCSCeqC_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMutlipleCSCeqCTransitMethod, "CStringPool::MutlipleCSCeqC transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMutlipleCSCeqCTransitMethod); sl@0: _LIT8(KStringC, "String3"); sl@0: Context().iResult = (Context().iC.DesC().CompareF(KStringC))==0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MutlipleCSCeqC_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCSStringToIndexTransition,"CStringPool_MultipleCSStringToIndex_Transition"); sl@0: sl@0: inline CStringPool_MultipleCSStringToIndex_Transition::CStringPool_MultipleCSStringToIndex_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCSStringToIndexTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCSStringToIndex_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCSStringToIndexTransitMethod, "CStringPool::MultipleCSStringToIndex transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCSStringToIndexTransitMethod); sl@0: if (Context().iIndex1==0 && Context().iIndex2==1 && Context().iIndex3==1 && Context().iIndex4==2) sl@0: Context().iResult = ETrue; sl@0: else sl@0: Context().iResult = EFalse; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCSStringToIndex_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCSDynamicStringTransition,"CStringPool_MultipleCSDynamicString_Transition"); sl@0: sl@0: inline CStringPool_MultipleCSDynamicString_Transition::CStringPool_MultipleCSDynamicString_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCSDynamicStringTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCSDynamicString_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCSDynamicStringTransitMethod, "CStringPool::MultipleCSDynamicString transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCSDynamicStringTransitMethod); sl@0: Context().iResult = Context().iE==Context().iF; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCSDynamicString_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleCSIndexToStringDynamicTransition,"CStringPool_MultipleCSIndexToStringDynamic_Transition"); sl@0: sl@0: inline CStringPool_MultipleCSIndexToStringDynamic_Transition::CStringPool_MultipleCSIndexToStringDynamic_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleCSIndexToStringDynamicTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleCSIndexToStringDynamic_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleCSIndexToStringDynamicTransitMethod, "CStringPool::MultipleCSIndexToStringDynamic transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleCSIndexToStringDynamicTransitMethod); sl@0: _LIT8(KStringE, "AnotherString"); sl@0: Context().iResult = (Context().iE.DesC().CompareF(KStringE))==0; sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleCSIndexToStringDynamic_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolMultipleTableDtorTransition,"CStringPool_MultipleTableDtor_Transition"); sl@0: sl@0: inline CStringPool_MultipleTableDtor_Transition::CStringPool_MultipleTableDtor_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolMultipleTableDtorTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_MultipleTableDtor_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolMultipleTableDtorTransitMethod, "CStringPool::MultipleTableDtor transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolMultipleTableDtorTransitMethod); sl@0: Context().iA.Close(); sl@0: Context().iB.Close(); sl@0: Context().iC.Close(); sl@0: Context().iD.Close(); sl@0: Context().iE.Close(); sl@0: Context().iF.Close(); sl@0: sl@0: Context().iFA.Close(); sl@0: Context().iFB.Close(); sl@0: Context().iFC.Close(); sl@0: Context().iFD.Close(); sl@0: Context().iFE.Close(); sl@0: Context().iFF.Close(); sl@0: sl@0: Context().iStringPool.Close(); sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_MultipleTableDtor_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolBEU55DJG3Transition,"CStringPool_BEU55DJG3_Transition"); sl@0: sl@0: inline CStringPool_BEU55DJG3_Transition::CStringPool_BEU55DJG3_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolBEU55DJG3Transition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_BEU55DJG3_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolBEU55DJG3TransitMethod, "CStringPool::BEU55DJG3 transition"); sl@0: _LIT(KMinus1, "The Index() function returns = KErrNotFound"); sl@0: _LIT(KOther, "The Index() function returns something != -1"); sl@0: Context().DataLogger().LogInformation(KStringPoolBEU55DJG3TransitMethod); sl@0: TInt result; sl@0: result = Context().iEmptyOne.Index(Context().iTestTable); sl@0: if (result == KErrNotFound) sl@0: { sl@0: Context().iResult = 1; //ETrue sl@0: Context().DataLogger().LogInformation(KMinus1); sl@0: } sl@0: else sl@0: { sl@0: Context().iResult = 0 ;//EFalse sl@0: Context().DataLogger().LogInformation(KOther); sl@0: } sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_BEU55DJG3_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolKRN56NDEZTransition,"CStringPool_KRN56NDEZ_Transition"); sl@0: sl@0: inline CStringPool_KRN56NDEZ_Transition::CStringPool_KRN56NDEZ_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolKRN56NDEZTransition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_KRN56NDEZ_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolKRN56NDEZTransitMethod, "CStringPool::KRN56NDEZ transition"); sl@0: _LIT(KTestOK,"\n Test Passed"); sl@0: _LIT(KTestFailed,"\nTest Failed"); sl@0: sl@0: sl@0: Context().DataLogger().LogInformation(KStringPoolKRN56NDEZTransitMethod); sl@0: sl@0: //Open 2 tables with some string duplicates and open them sl@0: Context().iStringPool.OpenL(Short::Table); sl@0: Context().iStringPool.OpenL(Short2::Table); sl@0: sl@0: Context().iFAString = Context().iStringPool.StringF(Short2::EString,Short2::Table); sl@0: const TStringTable* originalTable= Context().iFAString.OriginalTableRef(); sl@0: sl@0: Context().iFADuplicateString = Context().iStringPool.StringF(Short::EString,Short::Table); sl@0: const TStringTable* ShortTable= Context().iFA.OriginalTableRef(); sl@0: sl@0: sl@0: if (ShortTable==originalTable) sl@0: { sl@0: Context().iResult=ETrue; sl@0: Context().DataLogger().LogInformation(KTestOK); sl@0: } sl@0: else sl@0: { sl@0: Context().iResult=EFalse; sl@0: Context().DataLogger().LogInformation(KTestFailed); sl@0: } sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_KRN56NDEZ_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolAPY57TEH3Transition,"CStringPool_APY57TEH3_Transition"); sl@0: sl@0: inline CStringPool_APY57TEH3_Transition::CStringPool_APY57TEH3_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolAPY57TEH3Transition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_APY57TEH3_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolAPY57TEH3TransitMethod, "CStringPool::APY57TEH3 transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolAPY57TEH3TransitMethod); sl@0: sl@0: sl@0: Context().iResult=(Context().iEmptyOne!=Context().iTFE); sl@0: sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_APY57TEH3_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: _LIT(KStringPoolHAD57SK27Transition,"CStringPool_HAD57SK27_Transition"); sl@0: sl@0: inline CStringPool_HAD57SK27_Transition::CStringPool_HAD57SK27_Transition(CUnitTestContext& aUTContext, sl@0: TTransitionValidator& aValidator) sl@0: : CTransitionType(KStringPoolHAD57SK27Transition, aUTContext, aValidator) sl@0: { sl@0: // Do nothing here. sl@0: } sl@0: sl@0: inline void CStringPool_HAD57SK27_Transition::TransitMethodL() sl@0: { sl@0: _LIT(KStringPoolHAD57SK27TransitMethod, "CStringPool::HAD57SK27 transition"); sl@0: Context().DataLogger().LogInformation(KStringPoolHAD57SK27TransitMethod); sl@0: sl@0: sl@0: // Create string pool and load HTTP static table sl@0: RStringPool pool; sl@0: sl@0: pool.OpenL(); sl@0: sl@0: _LIT8(KUndeletable_EX, "_ex"); sl@0: Context().iUndeletable_EX = pool.OpenStringL(KUndeletable_EX); sl@0: sl@0: _LIT8(KUndeletable_A," _a"); sl@0: Context().iUndeletable_A = pool.OpenStringL(KUndeletable_A()); sl@0: sl@0: // Load SecurityPolicyProperties static table sl@0: pool.OpenL(SecurityPolicyPluginStrings::Table); sl@0: sl@0: // Close strings opened sl@0: Context().iUndeletable_EX.Close(); sl@0: Context().iUndeletable_A.Close(); sl@0: sl@0: // Close the string pool sl@0: pool.Close(); sl@0: //if at this point the m pool string pool closes fine .the test has passed sl@0: _LIT(KTestHAD57SK27OK,"\n Defect HAD57SK27OK test : OK\n"); sl@0: Context().DataLogger().LogInformation(KTestHAD57SK27OK); sl@0: Context().iResult=ETrue; sl@0: sl@0: } sl@0: sl@0: inline CStringPool_UnitTestContext& CStringPool_HAD57SK27_Transition::Context() const sl@0: { sl@0: return REINTERPRET_CAST(CStringPool_UnitTestContext&,iUTContext); sl@0: } sl@0: