|
1 // Copyright (c) 2004-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 // Declarations for loopback tests |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef __LOOPBACK_TEST_STEP_H__ |
|
23 #define __LOOPBACK_TEST_STEP_H__ |
|
24 |
|
25 #include <c32comm.h> |
|
26 |
|
27 #include <test/testexecutestepbase.h> |
|
28 |
|
29 class CLoopbackTestStepBase : public CTestStep |
|
30 { |
|
31 public: |
|
32 CLoopbackTestStepBase(TInt aTestNumber); |
|
33 virtual ~CLoopbackTestStepBase(); |
|
34 |
|
35 TVerdict doTestStepPreambleL(); |
|
36 TVerdict doTestStepPostambleL(); |
|
37 static void SetTestNumber(TInt aTestNumber); |
|
38 static void SetFlowControl(TUint aUnit, TBool aFlowControlOn); |
|
39 static void SetReadResult(TUint aUnit, TInt aReadResult); |
|
40 static void SetWriteResult(TUint aUnit, TInt aWriteResult); |
|
41 |
|
42 void TestErrorCodeL(TInt aErrCode, const TDesC& aMessage); |
|
43 void TestErrorCodeL(TInt aErrCode, TInt aExpectedErrCode, const TDesC& aMessage); |
|
44 void TestBooleanTrueL(TInt aBool, const TDesC& aMessage); |
|
45 void TestErrorCodeAndDescriptorL(TInt aErrCode, const TDesC8& aDesC, const TDesC8& aExpectedDesC, const TDesC& aMessage); |
|
46 void TestErrorCodeAndDescriptorL(TInt aErrCode, TInt aExpectedErrCode, const TDesC8& aDesC, const TDesC8& aExpectedDesC, const TDesC& aMessage); |
|
47 |
|
48 /** The test number for this test */ |
|
49 TInt iTestNumber; |
|
50 protected: |
|
51 /** The comm server for this test step */ |
|
52 RCommServ iCommServer; |
|
53 RComm iCommPort1, iCommPort2, iCommPort3, iCommPort4; |
|
54 }; |
|
55 |
|
56 class CLoopbackTestStep1 : public CLoopbackTestStepBase |
|
57 { |
|
58 public: |
|
59 CLoopbackTestStep1(); |
|
60 ~CLoopbackTestStep1(); |
|
61 virtual TVerdict doTestStepL(); |
|
62 private: |
|
63 }; |
|
64 |
|
65 class CLoopbackTestStep2 : public CLoopbackTestStepBase |
|
66 { |
|
67 public: |
|
68 CLoopbackTestStep2(); |
|
69 ~CLoopbackTestStep2(); |
|
70 virtual TVerdict doTestStepL(); |
|
71 private: |
|
72 }; |
|
73 |
|
74 class CLoopbackTestStep3 : public CLoopbackTestStepBase |
|
75 { |
|
76 public: |
|
77 CLoopbackTestStep3(); |
|
78 ~CLoopbackTestStep3(); |
|
79 virtual TVerdict doTestStepL(); |
|
80 private: |
|
81 }; |
|
82 |
|
83 class CLoopbackTestStep4 : public CLoopbackTestStepBase |
|
84 { |
|
85 public: |
|
86 CLoopbackTestStep4(); |
|
87 ~CLoopbackTestStep4(); |
|
88 virtual TVerdict doTestStepL(); |
|
89 private: |
|
90 }; |
|
91 |
|
92 class CLoopbackTestStep5 : public CLoopbackTestStepBase |
|
93 { |
|
94 public: |
|
95 CLoopbackTestStep5(); |
|
96 ~CLoopbackTestStep5(); |
|
97 virtual TVerdict doTestStepL(); |
|
98 private: |
|
99 }; |
|
100 |
|
101 class CLoopbackTestStep6 : public CLoopbackTestStepBase |
|
102 { |
|
103 public: |
|
104 CLoopbackTestStep6(); |
|
105 ~CLoopbackTestStep6(); |
|
106 virtual TVerdict doTestStepL(); |
|
107 private: |
|
108 }; |
|
109 |
|
110 class CLoopbackTestStep7 : public CLoopbackTestStepBase |
|
111 { |
|
112 public: |
|
113 CLoopbackTestStep7(); |
|
114 ~CLoopbackTestStep7(); |
|
115 virtual TVerdict doTestStepL(); |
|
116 private: |
|
117 }; |
|
118 |
|
119 class CLoopbackTestStep8 : public CLoopbackTestStepBase |
|
120 { |
|
121 public: |
|
122 CLoopbackTestStep8(); |
|
123 ~CLoopbackTestStep8(); |
|
124 virtual TVerdict doTestStepL(); |
|
125 private: |
|
126 }; |
|
127 |
|
128 class CLoopbackTestStep9 : public CLoopbackTestStepBase |
|
129 { |
|
130 public: |
|
131 CLoopbackTestStep9(); |
|
132 ~CLoopbackTestStep9(); |
|
133 virtual TVerdict doTestStepL(); |
|
134 private: |
|
135 }; |
|
136 |
|
137 class CLoopbackTestStep10 : public CLoopbackTestStepBase |
|
138 { |
|
139 public: |
|
140 CLoopbackTestStep10(); |
|
141 ~CLoopbackTestStep10(); |
|
142 virtual TVerdict doTestStepL(); |
|
143 private: |
|
144 }; |
|
145 |
|
146 class CLoopbackTestStep11 : public CLoopbackTestStepBase |
|
147 { |
|
148 public: |
|
149 CLoopbackTestStep11(); |
|
150 ~CLoopbackTestStep11(); |
|
151 virtual TVerdict doTestStepL(); |
|
152 private: |
|
153 }; |
|
154 |
|
155 class CLoopbackTestStep12 : public CLoopbackTestStepBase |
|
156 { |
|
157 public: |
|
158 CLoopbackTestStep12(); |
|
159 ~CLoopbackTestStep12(); |
|
160 virtual TVerdict doTestStepL(); |
|
161 private: |
|
162 }; |
|
163 |
|
164 class CLoopbackTestStep13 : public CLoopbackTestStepBase |
|
165 { |
|
166 public: |
|
167 CLoopbackTestStep13(); |
|
168 ~CLoopbackTestStep13(); |
|
169 virtual TVerdict doTestStepL(); |
|
170 private: |
|
171 }; |
|
172 |
|
173 _LIT(KLoopbackTestStep1,"LoopbackTestStep1"); |
|
174 _LIT(KLoopbackTestStep2,"LoopbackTestStep2"); |
|
175 _LIT(KLoopbackTestStep3,"LoopbackTestStep3"); |
|
176 _LIT(KLoopbackTestStep4,"LoopbackTestStep4"); |
|
177 _LIT(KLoopbackTestStep5,"LoopbackTestStep5"); |
|
178 _LIT(KLoopbackTestStep6,"LoopbackTestStep6"); |
|
179 _LIT(KLoopbackTestStep7,"LoopbackTestStep7"); |
|
180 _LIT(KLoopbackTestStep8,"LoopbackTestStep8"); |
|
181 _LIT(KLoopbackTestStep9,"LoopbackTestStep9"); |
|
182 _LIT(KLoopbackTestStep10,"LoopbackTestStep10"); |
|
183 _LIT(KLoopbackTestStep11,"LoopbackTestStep11"); |
|
184 _LIT(KLoopbackTestStep12,"LoopbackTestStep12"); |
|
185 _LIT(KLoopbackTestStep13,"LoopbackTestStep13"); |
|
186 |
|
187 #endif |
|
188 |