diff -r e8c1ea2c6496 -r 8758140453c0 lbs/common/src/ctlbsstepverifyroughposinfos.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lbs/common/src/ctlbsstepverifyroughposinfos.cpp Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,73 @@ +// Copyright (c) 2006-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: +// @file ctlbsstep_verifyposinfos.cpp +// This is the class implementation for the Notify Position Update Tests +// +// + +#include "ctlbsstepverifyroughposinfos.h" + +#include "tlbsutils.h" + + +/** + * Constructor + */ +CT_LbsStep_VerifyRoughPosInfos::CT_LbsStep_VerifyRoughPosInfos(CT_LbsServer& aParent) : CT_LbsStep(aParent) + { + SetTestStepName(KLbsStep_VerifyRoughPosInfos); + } + + +/** +Static Constructor +*/ +CT_LbsStep_VerifyRoughPosInfos* CT_LbsStep_VerifyRoughPosInfos::New(CT_LbsServer& aParent) + { + return new CT_LbsStep_VerifyRoughPosInfos(aParent); + // Note the lack of ELeave. + // This means that having insufficient memory will return NULL; + } + + +/** + * @return - TVerdict code + * Override of base class pure virtual + * Our implementation only gets called if the base class doTestStepPreambleL() did + * not leave. That being the case, the current test result value will be EPass. + */ +TVerdict CT_LbsStep_VerifyRoughPosInfos::doTestStepL() + { + // Helper test step used to Verify the Position Information Array. + INFO_PRINTF1(_L(">>CT_LbsStep_VerifyRoughPosInfos::doTestStepL()")); + + if (TestStepResult() == EPass) + { + // Access the arrays to be compared. + RPointerArray& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; + RPointerArray& currentPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr; + T_LbsUtils utils; + + // Verify arrays are equal. + TBool res = utils.Compare_PosInfoArr(verifyPosInfoArr, currentPosInfoArr, T_LbsUtils::ERoughAccuracy); + + // Fail test if arrays do not match. + if (!res) + SetTestStepResult(EFail); + } + + INFO_PRINTF1(_L("<<CT_LbsStep_VerifyRoughPosInfos::doTestStepL()")); + + return TestStepResult(); + }