|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Example CTestStep derived implementation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file te_regconcurrentteststep1.cpp |
|
23 @internalTechnology |
|
24 */ |
|
25 #include "te_regchecktestresultstep.h" |
|
26 #include "te_regaccessstaticvarstep.h" |
|
27 #include "te_regconcurrenttestsuitedefs.h" |
|
28 |
|
29 CTe_RegCheckTestResultStep::~CTe_RegCheckTestResultStep() |
|
30 /** |
|
31 * Destructor |
|
32 */ |
|
33 { |
|
34 |
|
35 } |
|
36 |
|
37 CTe_RegCheckTestResultStep::CTe_RegCheckTestResultStep() |
|
38 /** |
|
39 * Constructor |
|
40 */ |
|
41 { |
|
42 // **MUST** call SetTestStepName in the constructor as the controlling |
|
43 // framework uses the test step name immediately following construction to set |
|
44 // up the step's unique logging ID. |
|
45 SetTestStepName(KTe_RegCheckTestResultStep); |
|
46 } |
|
47 |
|
48 |
|
49 |
|
50 TVerdict CTe_RegCheckTestResultStep::doTestStepL() |
|
51 /* |
|
52 * @return - TVerdict code |
|
53 * Override of base class pure virtual |
|
54 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
55 * not leave. That being the case, the current test result value will be EPass. |
|
56 */ |
|
57 { |
|
58 TLex lex(ConfigSection()); |
|
59 lex.SkipSpace(); |
|
60 TInt result; |
|
61 User::LeaveIfError(lex.Val(result)); |
|
62 if (result != CTe_RegAccessStaticVarStep::Iterator) |
|
63 { |
|
64 ERR_PRINTF3(_L("Test Failed, expected value %d, get value %d"), result, CTe_RegAccessStaticVarStep::Iterator); |
|
65 SetTestStepResult(EFail); |
|
66 } |
|
67 else |
|
68 { |
|
69 SetTestStepResult(EPass); |
|
70 } |
|
71 |
|
72 CTe_RegAccessStaticVarStep::Iterator = 0; |
|
73 return TestStepResult(); |
|
74 } |
|
75 |