diff -r 76f9aaeefbab -r e13acd883fbe common/tools/ats/smoketest/lbs/lbsclient/src/ctlbsclientpostp223.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/lbs/lbsclient/src/ctlbsclientpostp223.cpp Tue Nov 10 13:50:58 2009 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +// INCLUDES +#include "ctlbsclientpostp223.h" +#include +#include +#include +#include +#include +#include + +// CONSTANTS + +// ================= MEMBER FUNCTIONS ======================= + +// Constructor. +CT_LbsClientPosTp223::CT_LbsClientPosTp223(CT_LbsServer& aParent): CT_LbsPortedStepBase(aParent) + { + _LIT(KTestName, "TP223 - Range check in PSY"); + SetTestStepName(KTestName); + } + +// --------------------------------------------------------- +// Destructor. +// --------------------------------------------------------- +CT_LbsClientPosTp223::~CT_LbsClientPosTp223() + { + } + + +// --------------------------------------------------------- +// CT_LbsClientPosTp223::StartL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CT_LbsClientPosTp223::StartL() + { + + _LIT(KErrorMsg, "Get Module did not return KErrNotFound, error code = %d"); + CPosModules* db = CPosModules::OpenL(); + CleanupStack::PushL(db); + + TPositionModuleInfo moduleInfo; + + TRAPD(err,db->GetModuleInfoL(iUidTestRangePsy, + moduleInfo)); + + AssertTrueSecL(err == KErrNotFound,KErrorMsg, err); + + CleanupStack::PopAndDestroy(db); // db + + } + + +// --------------------------------------------------------- +// CT_LbsClientPosTp223::AssertTrueSecL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CT_LbsClientPosTp223::AssertTrueSecL(TBool aCondition, const TDesC& aErrorMsg, TInt aErrorCode) + { + if (!aCondition) + { + TBuf<100> buf; + buf.Format(aErrorMsg, aErrorCode); + LogErrorAndLeaveL(buf); + } + } + +