|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // The implementation of the transition classes upon the CComponentInfo class methods. |
|
15 // |
|
16 // |
|
17 |
|
18 // ______________________________________________________________________________ |
|
19 // |
|
20 _LIT(KComponentInfoNewLTransition,"CComponentInfo_NewL_Transition"); |
|
21 |
|
22 inline CComponentInfo_NewL_Transition::CComponentInfo_NewL_Transition(CUnitTestContext& aUTContext, |
|
23 TTransitionValidator& aValidator) |
|
24 : CTransitionType(KComponentInfoNewLTransition, aUTContext, aValidator) |
|
25 { |
|
26 // Do nothing here. |
|
27 } |
|
28 |
|
29 inline void CComponentInfo_NewL_Transition::TransitMethodL() |
|
30 { |
|
31 _LIT(KComponentInfoNewLTransitMethod, "CComponentInfo::NewL transition"); |
|
32 Context().DataLogger().LogInformation(KComponentInfoNewLTransitMethod); |
|
33 Context().iComponentInfo = CComponentInfo::NewL(Context().iEntryFunc,Context().iTestInfoArray); |
|
34 Context().iOwnParams = EFalse; |
|
35 } |
|
36 |
|
37 inline CComponentInfo_UnitTestContext& CComponentInfo_NewL_Transition::Context() const |
|
38 { |
|
39 return REINTERPRET_CAST(CComponentInfo_UnitTestContext&,iUTContext); |
|
40 } |
|
41 |
|
42 // ______________________________________________________________________________ |
|
43 // |
|
44 _LIT(KComponentInfoDtorTransition,"CComponentInfo_Dtor_Transition"); |
|
45 |
|
46 inline CComponentInfo_Dtor_Transition::CComponentInfo_Dtor_Transition(CUnitTestContext& aUTContext, |
|
47 TTransitionValidator& aValidator) |
|
48 : CTransition(KComponentInfoDtorTransition, aUTContext, aValidator) |
|
49 { |
|
50 // Do nothing here. |
|
51 } |
|
52 |
|
53 inline void CComponentInfo_Dtor_Transition::TransitMethodL() |
|
54 { |
|
55 _LIT(KComponentInfoDtorTransitMethod, "CComponentInfo::Dtor transition"); |
|
56 Context().DataLogger().LogInformation(KComponentInfoDtorTransitMethod); |
|
57 delete Context().iComponentInfo; |
|
58 Context().iComponentInfo = NULL; |
|
59 __UHEAP_MARKEND; /*removed from leaktransitiontest.cpp and added here to resolve alloc issue due to removal of reference to RHeap's member variable*/ |
|
60 |
|
61 } |
|
62 |
|
63 inline CComponentInfo_UnitTestContext& CComponentInfo_Dtor_Transition::Context() const |
|
64 { |
|
65 return REINTERPRET_CAST(CComponentInfo_UnitTestContext&,iUTContext); |
|
66 } |
|
67 |
|
68 // ______________________________________________________________________________ |
|
69 // |
|
70 _LIT(KComponentInfoEntryTransition,"CComponentInfo_Entry_Transition"); |
|
71 |
|
72 inline CComponentInfo_Entry_Transition::CComponentInfo_Entry_Transition(CUnitTestContext& aUTContext, |
|
73 TTransitionValidator& aValidator) |
|
74 : CTransition(KComponentInfoEntryTransition, aUTContext, aValidator) |
|
75 { |
|
76 // Do nothing here. |
|
77 } |
|
78 |
|
79 inline void CComponentInfo_Entry_Transition::TransitMethodL() |
|
80 { |
|
81 _LIT(KComponentInfoEntryTransitMethod, "CComponentInfo::Entry transition"); |
|
82 Context().DataLogger().LogInformation(KComponentInfoEntryTransitMethod); |
|
83 Context().iEntryFuncPostCheck = Context().iComponentInfo->GlobalEntryFunc(); |
|
84 } |
|
85 |
|
86 inline CComponentInfo_UnitTestContext& CComponentInfo_Entry_Transition::Context() const |
|
87 { |
|
88 return REINTERPRET_CAST(CComponentInfo_UnitTestContext&,iUTContext); |
|
89 } |
|
90 |
|
91 // ______________________________________________________________________________ |
|
92 // |
|
93 _LIT(KComponentInfoUnitTestsInfoTransition,"CComponentInfo_UnitTestsInfo_Transition"); |
|
94 |
|
95 inline CComponentInfo_UnitTestsInfo_Transition::CComponentInfo_UnitTestsInfo_Transition(CUnitTestContext& aUTContext, |
|
96 TTransitionValidator& aValidator) |
|
97 : CTransition(KComponentInfoUnitTestsInfoTransition, aUTContext, aValidator) |
|
98 { |
|
99 // Do nothing here. |
|
100 } |
|
101 |
|
102 inline void CComponentInfo_UnitTestsInfo_Transition::TransitMethodL() |
|
103 { |
|
104 _LIT(KComponentInfoUnitTestsInfoTransitMethod, "CComponentInfo::UnitTestsInfo transition"); |
|
105 Context().DataLogger().LogInformation(KComponentInfoUnitTestsInfoTransitMethod); |
|
106 Context().iTestInfoArrayPostCheck = &Context().iComponentInfo->UnitTestsInfo(); |
|
107 } |
|
108 |
|
109 inline CComponentInfo_UnitTestContext& CComponentInfo_UnitTestsInfo_Transition::Context() const |
|
110 { |
|
111 return REINTERPRET_CAST(CComponentInfo_UnitTestContext&,iUTContext); |
|
112 } |