common/tools/ats/smoketest/lbs/common/src/ctlbsstepverifyroughposinfos.cpp
changeset 748 e13acd883fbe
child 872 17498133d9ad
equal deleted inserted replaced
747:76f9aaeefbab 748:e13acd883fbe
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file ctlbsstep_verifyposinfos.cpp
       
    15 // This is the class implementation for the Notify Position Update Tests
       
    16 // 
       
    17 //
       
    18  
       
    19 #include "ctlbsstepverifyroughposinfos.h"
       
    20 
       
    21 #include "tlbsutils.h"
       
    22 
       
    23 
       
    24 /**
       
    25  * Constructor
       
    26  */
       
    27 CT_LbsStep_VerifyRoughPosInfos::CT_LbsStep_VerifyRoughPosInfos(CT_LbsServer& aParent) : CT_LbsStep(aParent)
       
    28 	{
       
    29 	SetTestStepName(KLbsStep_VerifyRoughPosInfos);
       
    30 	}
       
    31 
       
    32 
       
    33 /**
       
    34 Static Constructor
       
    35 */
       
    36 CT_LbsStep_VerifyRoughPosInfos* CT_LbsStep_VerifyRoughPosInfos::New(CT_LbsServer& aParent)
       
    37 	{
       
    38 	return new CT_LbsStep_VerifyRoughPosInfos(aParent);
       
    39 	// Note the lack of ELeave.
       
    40 	// This means that having insufficient memory will return NULL;
       
    41 	}
       
    42 
       
    43 
       
    44 /**
       
    45  * @return - TVerdict code
       
    46  * Override of base class pure virtual
       
    47  * Our implementation only gets called if the base class doTestStepPreambleL() did
       
    48  * not leave. That being the case, the current test result value will be EPass.
       
    49  */
       
    50 TVerdict CT_LbsStep_VerifyRoughPosInfos::doTestStepL()
       
    51 	{
       
    52 	// Helper test step used to Verify the Position Information Array.
       
    53 	INFO_PRINTF1(_L(">>CT_LbsStep_VerifyRoughPosInfos::doTestStepL()"));
       
    54 
       
    55 	if (TestStepResult() == EPass)
       
    56 		{
       
    57 		// Access the arrays to be compared.
       
    58 		RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
       
    59 		RPointerArray<TAny>& currentPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
    60 		T_LbsUtils utils;
       
    61 		
       
    62 		// Verify arrays are equal.
       
    63 		TBool res = utils.Compare_PosInfoArr(verifyPosInfoArr, currentPosInfoArr, T_LbsUtils::ERoughAccuracy);
       
    64 		
       
    65 		// Fail test if arrays do not match.
       
    66 		if (!res)
       
    67 			SetTestStepResult(EFail);
       
    68 		}
       
    69 
       
    70 	INFO_PRINTF1(_L("&lt;&lt;CT_LbsStep_VerifyRoughPosInfos::doTestStepL()"));
       
    71 
       
    72 	return TestStepResult();
       
    73 	}