First public contribution.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #include <Stiftestinterface.h>
24 // EXTERNAL DATA STRUCTURES
25 //extern ?external_data;
27 // EXTERNAL FUNCTION PROTOTYPES
28 //extern ?external_function( ?arg_type,?arg_type );
31 //const ?type ?constant_var = ?constant;
34 //#define ?macro ?macro_def
36 // LOCAL CONSTANTS AND MACROS
37 //const ?type ?constant_var = ?constant;
38 //#define ?macro_name ?macro_def
40 // MODULE DATA STRUCTURES
42 //typedef ?declaration
44 // LOCAL FUNCTION PROTOTYPES
45 //?type ?function_name( ?arg_type, ?arg_type );
47 // FORWARD DECLARATIONS
48 //class ?FORWARD_CLASSNAME;
50 // ============================= LOCAL FUNCTIONS ===============================
52 // -----------------------------------------------------------------------------
53 // ?function_name ?description.
55 // Returns: ?value_1: ?description
56 // ?value_n: ?description_line1
58 // -----------------------------------------------------------------------------
62 ?arg_type arg, // ?description
63 ?arg_type arg) // ?description
73 // ============================ MEMBER FUNCTIONS ===============================
75 // -----------------------------------------------------------------------------
77 // C++ default constructor can NOT contain any code, that
79 // -----------------------------------------------------------------------------
82 CTestModuleIf& aTestModuleIf ):
83 CScriptBase( aTestModuleIf )
87 // -----------------------------------------------------------------------------
88 // Ctlocale::ConstructL
89 // Symbian 2nd phase constructor can leave.
90 // -----------------------------------------------------------------------------
92 void Ctlocale::ConstructL()
94 iLog = CStifLogger::NewL( KtlocaleLogPath,
99 SendTestModuleVersion();
102 // -----------------------------------------------------------------------------
104 // Two-phased constructor.
105 // -----------------------------------------------------------------------------
107 Ctlocale* Ctlocale::NewL(
108 CTestModuleIf& aTestModuleIf )
110 Ctlocale* self = new (ELeave) Ctlocale( aTestModuleIf );
112 CleanupStack::PushL( self );
121 Ctlocale::~Ctlocale()
124 // Delete resources allocated from test methods
132 // ========================== OTHER EXPORTED FUNCTIONS =========================
134 // -----------------------------------------------------------------------------
135 // LibEntryL is a polymorphic Dll entry point.
136 // Returns: CScriptBase: New CScriptBase derived object
137 // -----------------------------------------------------------------------------
139 EXPORT_C CScriptBase* LibEntryL(
140 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
143 return ( CScriptBase* ) Ctlocale::NewL( aTestModuleIf );
147 //-----------------------------------------------------------------------------
148 // Ctlocale::SendTestClassVersion
149 // Method used to send version of test class
150 //-----------------------------------------------------------------------------
152 void Ctlocale::SendTestModuleVersion()
154 TVersion moduleVersion;
155 moduleVersion.iMajor = TEST_MODULE_VERSION_MAJOR;
156 moduleVersion.iMinor = TEST_MODULE_VERSION_MINOR;
157 moduleVersion.iBuild = TEST_MODULE_VERSION_BUILD;
159 TFileName moduleName;
160 moduleName = _L("Ctlocale.dll");
163 TBool newVersionOfMethod = ETrue;
164 CTestModuleIf &test=TestModuleIf();
165 test.SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
166 test.SetBehavior(CTestModuleIf::ETestLeaksHandles);