|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "TLocTest.h" |
|
24 #include <Stiftestinterface.h> |
|
25 |
|
26 |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CTLocTest::CTLocTest |
|
32 // C++ default constructor can NOT contain any code, that |
|
33 // might leave. |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CTLocTest::CTLocTest( |
|
37 CTestModuleIf& aTestModuleIf ): |
|
38 CScriptBase( aTestModuleIf ) |
|
39 { |
|
40 |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CTLocTest::ConstructL |
|
45 // Symbian 2nd phase constructor can leave. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 void CTLocTest::ConstructL() |
|
49 { |
|
50 iLog = CStifLogger::NewL( KTLocTestLogPath, |
|
51 KTLocTestLogFile, |
|
52 CStifLogger::ETxt, |
|
53 CStifLogger::EFile, |
|
54 EFalse ); |
|
55 |
|
56 |
|
57 |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CTLocTest::NewL |
|
62 // Two-phased constructor. |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 CTLocTest* CTLocTest::NewL( |
|
66 CTestModuleIf& aTestModuleIf ) |
|
67 { |
|
68 CTLocTest* self = new (ELeave) CTLocTest( aTestModuleIf ); |
|
69 |
|
70 CleanupStack::PushL( self ); |
|
71 self->ConstructL(); |
|
72 CleanupStack::Pop(); |
|
73 |
|
74 return self; |
|
75 |
|
76 } |
|
77 |
|
78 // Destructor |
|
79 CTLocTest::~CTLocTest() |
|
80 { |
|
81 |
|
82 // Delete resources allocated from test methods |
|
83 Delete(); |
|
84 |
|
85 // Delete logger |
|
86 delete iLog; |
|
87 ; |
|
88 |
|
89 } |
|
90 |
|
91 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // LibEntryL is a polymorphic Dll entry point. |
|
95 // Returns: CScriptBase: New CScriptBase derived object |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 EXPORT_C CScriptBase* LibEntryL( |
|
99 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
100 { |
|
101 |
|
102 return ( CScriptBase* ) CTLocTest::NewL( aTestModuleIf ); |
|
103 |
|
104 } |
|
105 |
|
106 // ----------------------------------------------------------------------------- |
|
107 // E32Dll is a DLL entry point function. |
|
108 // Returns: KErrNone |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
112 GLDEF_C TInt E32Dll( |
|
113 TDllReason /*aReason*/) // Reason code |
|
114 { |
|
115 return(KErrNone); |
|
116 |
|
117 } |
|
118 #endif // EKA2 |
|
119 |
|
120 // End of File |