--- a/radioengine/settings/tsrc/src/SettingsTestModule.cpp Fri Sep 03 12:25:04 2010 +0300
+++ b/radioengine/settings/tsrc/src/SettingsTestModule.cpp Mon Sep 20 18:04:48 2010 +0300
@@ -1,75 +1,29 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains testclass implementation.
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: This file contains testclass implementation.
+ *
+ */
-// INCLUDE FILES
+// System includes
#include <Stiftestinterface.h>
#include <SettingServerClient.h>
+
+// User includes
#include "SettingsTestModule.h"
#include "trace.h"
-// EXTERNAL DATA STRUCTURES
-//extern ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-// ?value_n: ?description_line1
-// ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
- ?arg_type arg, // ?description
- ?arg_type arg) // ?description
- {
-
- ?code // ?comment
-
- // ?comment
- ?code
- }
-*/
-
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -78,14 +32,12 @@
// might leave.
// -----------------------------------------------------------------------------
//
-CSettingsTestModule::CSettingsTestModule(
- CTestModuleIf& aTestModuleIf ):
- CScriptBase( aTestModuleIf )
+CSettingsTestModule::CSettingsTestModule(CTestModuleIf& aTestModuleIf) :
+ CScriptBase(aTestModuleIf)
{
FUNC_LOG;
}
-// -----------------------------------------------------------------------------
// CSettingsTestModule::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
@@ -93,29 +45,29 @@
void CSettingsTestModule::ConstructL()
{
FUNC_LOG;
-
+
//Read logger settings to check whether test case name is to be
//appended to log file name.
RSettingServer settingServer;
TInt ret = settingServer.Connect();
- if(ret != KErrNone)
+ if (ret != KErrNone)
{
User::Leave(ret);
}
// Struct to StifLogger settigs.
- TLoggerSettings loggerSettings;
+ TLoggerSettings loggerSettings;
// Parse StifLogger defaults from STIF initialization file.
ret = settingServer.GetLoggerSettings(loggerSettings);
- if(ret != KErrNone)
+ if (ret != KErrNone)
{
User::Leave(ret);
- }
+ }
// Close Setting server session
settingServer.Close();
TFileName logFileName;
-
- if(loggerSettings.iAddTestCaseTitle)
+
+ if (loggerSettings.iAddTestCaseTitle)
{
TName title;
TestModuleIf().GetTestCaseTitleL(title);
@@ -126,12 +78,9 @@
logFileName.Copy(KSettingsTestModuleLogFile);
}
- iLog = CStifLogger::NewL( KSettingsTestModuleLogPath,
- logFileName,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse );
-
+ iLog = CStifLogger::NewL(KSettingsTestModuleLogPath, logFileName,
+ CStifLogger::ETxt, CStifLogger::EFile, EFalse);
+
SendTestClassVersion();
}
@@ -140,13 +89,13 @@
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
-CSettingsTestModule* CSettingsTestModule::NewL(
- CTestModuleIf& aTestModuleIf )
+CSettingsTestModule* CSettingsTestModule::NewL(CTestModuleIf& aTestModuleIf)
{
FUNC_LOG;
- CSettingsTestModule* self = new (ELeave) CSettingsTestModule( aTestModuleIf );
+ CSettingsTestModule* self = new (ELeave) CSettingsTestModule(
+ aTestModuleIf);
- CleanupStack::PushL( self );
+ CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
@@ -156,14 +105,14 @@
// Destructor
CSettingsTestModule::~CSettingsTestModule()
- {
+ {
FUNC_LOG;
// Delete resources allocated from test methods
Delete();
// Delete logger
- delete iLog;
+ delete iLog;
}
@@ -173,19 +122,20 @@
//-----------------------------------------------------------------------------
//
void CSettingsTestModule::SendTestClassVersion()
- {
- FUNC_LOG;
- TVersion moduleVersion;
- moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
- moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
- moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-
- TFileName moduleName;
- moduleName = _L("SettingsTestModule.dll");
+ {
+ FUNC_LOG;
+ TVersion moduleVersion;
+ moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+ moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+ moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
- TBool newVersionOfMethod = ETrue;
- TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
- }
+ TFileName moduleName;
+ moduleName = _L("SettingsTestModule.dll");
+
+ TBool newVersionOfMethod = ETrue;
+ TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName,
+ newVersionOfMethod);
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
@@ -194,14 +144,12 @@
// Returns: CScriptBase: New CScriptBase derived object
// -----------------------------------------------------------------------------
//
-EXPORT_C CScriptBase* LibEntryL(
- CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+EXPORT_C CScriptBase* LibEntryL(CTestModuleIf& aTestModuleIf) // Backpointer to STIF Test Framework
{
FUNC_LOG;
- return ( CScriptBase* ) CSettingsTestModule::NewL( aTestModuleIf );
+ return (CScriptBase*) CSettingsTestModule::NewL(aTestModuleIf);
}
-
// End of File