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 WriteStringStep.cpp |
|
23 */ |
|
24 #include "abortstep.h" |
|
25 #include "te_regsteptestsuitedefs.h" |
|
26 |
|
27 CAbortTestStep::~CAbortTestStep() |
|
28 /** |
|
29 * Destructor |
|
30 */ |
|
31 { |
|
32 } |
|
33 |
|
34 CAbortTestStep::CAbortTestStep() |
|
35 /** |
|
36 * Constructor |
|
37 */ |
|
38 { |
|
39 SetTestStepName(KAbortTestStep); |
|
40 } |
|
41 |
|
42 TVerdict CAbortTestStep::doTestStepPreambleL() |
|
43 /** |
|
44 * @return - TVerdict code |
|
45 * Override of base class virtual |
|
46 */ |
|
47 { |
|
48 // There is no initiation work so set this result to pass. |
|
49 SetTestStepResult(EPass); |
|
50 return TestStepResult(); |
|
51 } |
|
52 |
|
53 |
|
54 TVerdict CAbortTestStep::doTestStepL() |
|
55 /** |
|
56 * @return - TVerdict code |
|
57 * Override of base class pure virtual |
|
58 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
59 * not leave. That being the case, the current test result value will be EPass. |
|
60 */ |
|
61 { |
|
62 INFO_PRINTF1(_L("This test step should be aborted!")); |
|
63 SetTestStepResult(EFail); |
|
64 User::After(100000000); |
|
65 SetTestStepResult(EPass); |
|
66 return TestStepResult(); |
|
67 } |
|
68 |
|
69 |
|
70 |
|
71 TVerdict CAbortTestStep::doTestStepPostambleL() |
|
72 /** |
|
73 * @return - TVerdict code |
|
74 * Override of base class virtual |
|
75 */ |
|
76 { |
|
77 return TestStepResult(); |
|
78 } |
|