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_regperformancereleasememteststep.cpp |
|
23 @internalTechnology |
|
24 */ |
|
25 #include <hal.h> |
|
26 #include "te_regperformancereleasememteststep.h" |
|
27 |
|
28 CTe_RegPerformanceReleaseMemTestStep::~CTe_RegPerformanceReleaseMemTestStep() |
|
29 /** |
|
30 * Destructor |
|
31 */ |
|
32 { |
|
33 |
|
34 } |
|
35 |
|
36 CTe_RegPerformanceReleaseMemTestStep::CTe_RegPerformanceReleaseMemTestStep(RChunk& aChunk) : iChunk(aChunk) |
|
37 /** |
|
38 * Constructor |
|
39 */ |
|
40 { |
|
41 // **MUST** call SetTestStepName in the constructor as the controlling |
|
42 // framework uses the test step name immediately following construction to set |
|
43 // up the step's unique logging ID. |
|
44 SetTestStepName(KTe_RegPerformanceReleaseMemTestStep); |
|
45 } |
|
46 |
|
47 TVerdict CTe_RegPerformanceReleaseMemTestStep::doTestStepPreambleL() |
|
48 /** |
|
49 * @return - TVerdict code |
|
50 * Override of base class virtual |
|
51 */ |
|
52 { |
|
53 SetTestStepResult(EPass); |
|
54 return TestStepResult(); |
|
55 } |
|
56 |
|
57 |
|
58 TVerdict CTe_RegPerformanceReleaseMemTestStep::doTestStepL() |
|
59 /** |
|
60 * @return - TVerdict code |
|
61 * Override of base class pure virtual |
|
62 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
63 * not leave. That being the case, the current test result value will be EPass. |
|
64 */ |
|
65 { |
|
66 INFO_PRINTF1(_L("Release Low Ram Condition")); |
|
67 |
|
68 TInt totalFree =0; |
|
69 User::LeaveIfError(HAL::Get(HALData::EMemoryRAMFree, totalFree)); |
|
70 INFO_PRINTF2(_L("RAM status before releasing: Total Free RAM:%D bytes"), totalFree); |
|
71 |
|
72 iChunk.Close(); |
|
73 User::LeaveIfError(HAL::Get(HALData::EMemoryRAMFree, totalFree)); |
|
74 |
|
75 INFO_PRINTF2(_L("RAM status after releasing: Total Free RAM:%D bytes"), totalFree); |
|
76 |
|
77 return TestStepResult(); |
|
78 } |
|
79 |
|
80 |
|
81 |
|
82 TVerdict CTe_RegPerformanceReleaseMemTestStep::doTestStepPostambleL() |
|
83 /** |
|
84 * @return - TVerdict code |
|
85 * Override of base class virtual |
|
86 */ |
|
87 { |
|
88 return TestStepResult(); |
|
89 } |
|