748
|
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 ctlbsstepverifymodinfo.cpp
|
|
15 |
// This is the class implementation for the Verify Module Information test step
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#include "ctlbsstepverifymodinfo.h"
|
|
20 |
|
|
21 |
#include "tlbsutils.h"
|
|
22 |
|
|
23 |
|
|
24 |
/**
|
|
25 |
* Constructor
|
|
26 |
*/
|
|
27 |
CT_LbsStep_VerifyModInfo::CT_LbsStep_VerifyModInfo(CT_LbsServer& aParent) : CT_LbsStep(aParent)
|
|
28 |
{
|
|
29 |
SetTestStepName(KLbsStep_VerifyModInfo);
|
|
30 |
}
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
Static Constructor
|
|
35 |
*/
|
|
36 |
CT_LbsStep_VerifyModInfo* CT_LbsStep_VerifyModInfo::New(CT_LbsServer& aParent)
|
|
37 |
{
|
|
38 |
return new CT_LbsStep_VerifyModInfo(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_VerifyModInfo::doTestStepL()
|
|
51 |
{
|
|
52 |
// Helper test step used to verify module information.
|
|
53 |
INFO_PRINTF1(_L(">>CT_LbsStep_VerifyModInfo::doTestStepL()"));
|
|
54 |
|
|
55 |
if (TestStepResult() == EPass)
|
|
56 |
{
|
|
57 |
// Access the module infos to be compared.
|
|
58 |
TPositionModuleInfo& verifyModInfo = iParent.iSharedData->iVerifyModuleInfo;
|
|
59 |
TPositionModuleInfo& currentModInfo = iParent.iSharedData->iCurrentModuleInfo;
|
|
60 |
T_LbsUtils utils;
|
|
61 |
|
|
62 |
// Verify module informations are equal.
|
|
63 |
TBool res = utils.Compare_ModuleInfo(verifyModInfo, currentModInfo);
|
|
64 |
|
|
65 |
// Fail test if they do not match.
|
|
66 |
if (!res)
|
|
67 |
{
|
|
68 |
SetTestStepResult(EFail);
|
|
69 |
}
|
|
70 |
}
|
|
71 |
|
|
72 |
INFO_PRINTF1(_L("<<CT_LbsStep_VerifyModInfo::doTestStepL()"));
|
|
73 |
|
|
74 |
return TestStepResult();
|
|
75 |
}
|