|
1 // Copyright (c) 2005-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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "cteststepbtromconfigbase.h" |
|
17 |
|
18 _LIT(KBtExcludedKeyName, "BluetoothExcluded"); |
|
19 |
|
20 CTestStepBtRomConfigBase::~CTestStepBtRomConfigBase() |
|
21 { |
|
22 } |
|
23 |
|
24 /** |
|
25 Constructor sets the default test result to inconclusive |
|
26 Up to the test to either explicitly fail the test or to |
|
27 explicitly pass |
|
28 */ |
|
29 CTestStepBtRomConfigBase::CTestStepBtRomConfigBase(CTestServer& aParent) |
|
30 : iParent(aParent) |
|
31 { |
|
32 SetTestStepResult(EInconclusive); |
|
33 } |
|
34 |
|
35 /** |
|
36 The ROMConfig tests run in two configurations: |
|
37 ROM with component included |
|
38 ROM with component excluded |
|
39 By specifying the appropriate ini section, the test behaviour can be altered |
|
40 */ |
|
41 TVerdict CTestStepBtRomConfigBase::doTestStepPreambleL() |
|
42 { |
|
43 if ( GetBoolFromConfig(ConfigSection(),KBtExcludedKeyName, iBtExcluded) ) |
|
44 { |
|
45 return EPass; |
|
46 } |
|
47 return EFail; |
|
48 } |
|
49 |
|
50 /** |
|
51 Should be called at the end of every test |
|
52 Checks if the default (EInconclusive) result is still set |
|
53 i.e. test has NOT set the result to EFail |
|
54 If still EInconclusive, then sets the result to EPass. |
|
55 */ |
|
56 void CTestStepBtRomConfigBase::CheckAndSetTestResult() |
|
57 { |
|
58 if ( TestStepResult()==EInconclusive ) |
|
59 { |
|
60 SetTestStepResult(EPass); |
|
61 } |
|
62 } |
|
63 |
|
64 // EOF |