|
1 // Copyright (c) 2008-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 // Base class for calculation tests |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __CT_LBS_CALCULATION_STEP_BASE_H__ |
|
19 #define __CT_LBS_CALCULATION_STEP_BASE_H__ |
|
20 |
|
21 // User includes |
|
22 #include <test/testexecutestepbase.h> |
|
23 |
|
24 //CONSTANTS |
|
25 const TInt KMaxLogLineLength = 255; |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CT_LbsCalculationServer; |
|
29 class T_LbsCalculationCheck; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 class CT_LbsCalculationStepBase : public CTestStep |
|
33 { |
|
34 |
|
35 public: |
|
36 virtual ~CT_LbsCalculationStepBase(); |
|
37 |
|
38 virtual TVerdict doTestStepPreambleL(); |
|
39 virtual TVerdict doTestStepPostambleL(); |
|
40 |
|
41 protected: // New functions |
|
42 |
|
43 TInt ReadValues(); |
|
44 |
|
45 void AssertTrueSecL(TBool aCondition, const TDesC& aErrorMsg, TInt aErrorCode); |
|
46 |
|
47 void LogError(const TBool aCondition, |
|
48 const T_LbsCalculationCheck& aCalc, |
|
49 const TInt aErrorCode, |
|
50 const TInt aRow=0); |
|
51 |
|
52 void LogErrorAndLeaveL(const TDesC& aErrorMsg); |
|
53 |
|
54 virtual void LogTestError(const T_LbsCalculationCheck& aCalc, |
|
55 const TInt aError, |
|
56 const TInt aRow) = 0; |
|
57 |
|
58 protected: |
|
59 |
|
60 void ConstructL(); |
|
61 CT_LbsCalculationStepBase(CT_LbsCalculationServer& aParent); |
|
62 |
|
63 protected: |
|
64 |
|
65 CActiveScheduler* iScheduler; |
|
66 RArray<T_LbsCalculationCheck> iCalculationChecks; |
|
67 RFs iFileServer; |
|
68 CT_LbsCalculationServer& iParent; |
|
69 }; |
|
70 |
|
71 #endif // __CT_LBS_CALCULATION_STEP_BASE_H__ |