author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 07 Jan 2010 13:38:45 +0200 | |
changeset 6 | 0173bcd7697c |
parent 2 | 4122176ea935 |
permissions | -rw-r--r-- |
0 | 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 |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
5 |
// under the terms of "Eclipse Public License v1.0" |
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 |
// |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
14 |
// Description: |
0 | 15 |
// |
16 |
//! @file |
|
17 |
//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-ram |
|
18 |
//! @SYMScriptTestEnvironment This test script requires a basic ROM. |
|
19 |
//! @SYMScriptAuthor Dmitri Trofimov, Anton Grober |
|
20 |
//! @SYMScriptCreationDate 17/12/2006 |
|
21 |
//! @SYMScriptDescription The test script contains API tests for the following functions of TOpenFileScan class |
|
22 |
//! TOpenFileScan(RFs &aFs); |
|
23 |
//! void NextL(CFileList *&aFileList); |
|
24 |
//! TThreadId ThreadId() const; |
|
25 |
||
26 |
LOAD_SERVER T_SfSrv –SharedData |
|
27 |
DELAY 5000 |
|
28 |
||
29 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0001 |
|
30 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0001 |
|
31 |
//! @SYMAPI TOpenFileScan |
|
32 |
//! @SYMTestCaseDesc TOpenFileScan() passing a reference to an open RFs object as a parameter |
|
33 |
//! Uses API elements: TOpenFileScan() |
|
34 |
//! @SYMTestActions 1. Create RFs object. |
|
35 |
//! 2. Call Connect on RFs. |
|
36 |
//! 3. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
37 |
//! 4. Delete TOpenFileScan object. |
|
38 |
//! 5. Delete RFs object. |
|
39 |
//! |
|
40 |
//! @SYMTestStatus Implemented |
|
41 |
//! @SYMTestPriority Critical |
|
42 |
//! @SYMTestExpectedResults Function does not leave nor panic. |
|
43 |
//! |
|
44 |
//! @SYMTestType CIT |
|
45 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
46 |
CREATE_OBJECT RFs RFs1 |
|
47 |
CREATE_OBJECT CFileMan CFileMan1 |
|
48 |
COMMAND RFs1 new |
|
49 |
COMMAND RFs1 Connect |
|
50 |
COMMAND RFs1 MkDirAll PathToRamDir |
|
51 |
COMMAND CFileMan1 NewL RFs1Used |
|
52 |
COMMAND CFileMan1 Copy CopyTest1 |
|
53 |
COMMAND CFileMan1 ~ |
|
54 |
COMMAND RFs1 ~ |
|
55 |
END_TEST_BLOCK |
|
56 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
57 |
CREATE_OBJECT RFs RFs1 |
|
58 |
CREATE_OBJECT RFile RFile1 |
|
59 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
60 |
COMMAND RFs1 new |
|
61 |
COMMAND RFs1 Connect |
|
62 |
COMMAND RFile1 new |
|
63 |
COMMAND RFile1 Open filename1 |
|
64 |
COMMAND RFile1 Close |
|
65 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0001command4new |
|
66 |
COMMAND TOpenFileScan1 ~ |
|
67 |
COMMAND RFs1 ~ |
|
68 |
END_TEST_BLOCK |
|
69 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
70 |
CREATE_OBJECT RFs RFs1 |
|
71 |
CREATE_OBJECT CFileMan CFileMan1 |
|
72 |
COMMAND RFs1 new |
|
73 |
COMMAND RFs1 Connect |
|
74 |
COMMAND CFileMan1 NewL RFs1Used |
|
75 |
COMMAND CFileMan1 Delete DeleteRamFiles |
|
76 |
COMMAND RFs1 RmDir PathToRamDir |
|
77 |
COMMAND CFileMan1 ~ |
|
78 |
COMMAND RFs1 ~ |
|
79 |
END_TEST_BLOCK |
|
80 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0001 |
|
81 |
||
82 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0002 |
|
83 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0002 |
|
84 |
//! @SYMAPI TOpenFileScan |
|
85 |
//! @SYMTestCaseDesc NextL() |
|
86 |
//! Uses API elements: NextL() |
|
87 |
//! @SYMTestActions 1. Create RFs object. |
|
88 |
//! 2. Call Connect() on RFs. |
|
89 |
//! 3. Create TOpenFileScan object passing a reference to th RFs object as a parameter. |
|
90 |
//! 4. Call NextL() on TOpenFileScan passing CFileList pointer as a parameter. |
|
91 |
//! 5. Delete TOpenFileScan object. |
|
92 |
//! 6. Delete RFs object. |
|
93 |
//! |
|
94 |
//! @SYMTestStatus Implemented |
|
95 |
//! @SYMTestPriority Critical |
|
96 |
//! @SYMTestExpectedResults NextL() doest not leave nor panic. |
|
97 |
//! @SYMTestType CIT |
|
98 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
99 |
CREATE_OBJECT RFs RFs1 |
|
100 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
101 |
COMMAND RFs1 new |
|
102 |
COMMAND RFs1 Connect |
|
103 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0002command4new |
|
104 |
COMMAND TOpenFileScan1 NextL |
|
105 |
COMMAND TOpenFileScan1 ~ |
|
106 |
COMMAND RFs1 ~ |
|
107 |
END_TEST_BLOCK |
|
108 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0002 |
|
109 |
||
110 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0003 |
|
111 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0003 |
|
112 |
//! @SYMAPI TOpenFileScan |
|
113 |
//! @SYMTestCaseDesc ThreadId() test. |
|
114 |
//! Uses API elements: NextL(), ThreadId() |
|
115 |
//! @SYMTestActions 1. Create RFs object. |
|
116 |
//! 2. Call Connect() on RFs. |
|
117 |
//! 3. Call Open() on RFile to open file name in test dir 'Test1.txt'. |
|
118 |
//! 4. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
119 |
//! 5. Call NextL(). Call with parameter expected_file to make this function loop until neccessary file found in |
|
120 |
//! CFileList being returned by function. |
|
121 |
//! 6. Call ThreadId() on TOpenFileScan and compare it with returned by CT_FsData::ThreadId() function. |
|
122 |
//! 7. Delete TOpenFileScan object. |
|
123 |
//! 8. Delete RFs object. |
|
124 |
//! |
|
125 |
//! @SYMTestStatus Implemented |
|
126 |
//! @SYMTestPriority Critical |
|
127 |
//! @SYMTestExpectedResults ThreadId() returns same value as got from CT_FsData suite using ThreadId() function. |
|
128 |
//! @SYMTestType CIT |
|
129 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
130 |
CREATE_OBJECT RFs RFs1 |
|
131 |
CREATE_OBJECT CFileMan CFileMan1 |
|
132 |
COMMAND RFs1 new |
|
133 |
COMMAND RFs1 Connect |
|
134 |
COMMAND RFs1 MkDirAll PathToRamDir |
|
135 |
COMMAND CFileMan1 NewL RFs1Used |
|
136 |
COMMAND CFileMan1 Copy CopyTest1 |
|
137 |
COMMAND CFileMan1 ~ |
|
138 |
COMMAND RFs1 ~ |
|
139 |
END_TEST_BLOCK |
|
140 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
141 |
CREATE_OBJECT RFs RFs1 |
|
142 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
143 |
CREATE_OBJECT RFile RFile1 |
|
144 |
COMMAND RFs1 new |
|
145 |
COMMAND RFs1 Connect |
|
146 |
COMMAND RFile1 new |
|
147 |
COMMAND RFile1 Open filename1 |
|
148 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0003command4new |
|
149 |
COMMAND TOpenFileScan1 NextL look_for_file1 |
|
150 |
COMMAND TOpenFileScan1 ThreadId filesession_for_thread1 |
|
151 |
COMMAND TOpenFileScan1 ~ |
|
152 |
COMMAND RFs1 ~ |
|
153 |
COMMAND RFile1 Close |
|
154 |
COMMAND RFile1 ~ |
|
155 |
END_TEST_BLOCK |
|
156 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
157 |
CREATE_OBJECT RFs RFs1 |
|
158 |
CREATE_OBJECT CFileMan CFileMan1 |
|
159 |
COMMAND RFs1 new |
|
160 |
COMMAND RFs1 Connect |
|
161 |
COMMAND CFileMan1 NewL RFs1Used |
|
162 |
COMMAND CFileMan1 Delete DeleteRamFiles |
|
163 |
COMMAND RFs1 RmDir PathToRamDir |
|
164 |
COMMAND CFileMan1 ~ |
|
165 |
COMMAND RFs1 ~ |
|
166 |
END_TEST_BLOCK |
|
167 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0003 |
|
168 |
||
169 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0004 |
|
170 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0004 |
|
171 |
//! @SYMAPI TOpenFileScan |
|
172 |
//! @SYMTestCaseDesc TOpenFileScan() passing a reference to an open RFs object as a parameter |
|
173 |
//! Uses API elements: TOpenFileScan() |
|
174 |
//! @SYMTestActions 1. Create RFs object. |
|
175 |
//! 2. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
176 |
//! 3. Delete TOpenFileScan object. |
|
177 |
//! 4. Delete RFs object. |
|
178 |
//! |
|
179 |
//! @SYMTestStatus Implemented |
|
180 |
//! @SYMTestPriority Critical |
|
181 |
//! @SYMTestExpectedResults Function does not leave nor panic. |
|
182 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
183 |
CREATE_OBJECT RFs RFs1 |
|
184 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
185 |
COMMAND RFs1 new |
|
186 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0004command3new |
|
187 |
COMMAND TOpenFileScan1 ~ |
|
188 |
COMMAND RFs1 ~ |
|
189 |
END_TEST_BLOCK |
|
190 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0004 |
|
191 |
||
192 |
||
193 |
||
194 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0005 |
|
195 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0005 |
|
196 |
//! @SYMAPI TOpenFileScan |
|
197 |
//! @SYMTestCaseDesc ThreadId() test with 2 simulateonus threads. |
|
198 |
//! Uses API elements: NextL(), ThreadId() |
|
199 |
//! @SYMTestActions For thread 1. |
|
200 |
//! 1. Create RFs object. |
|
201 |
//! 2. Call Connect() on RFs. |
|
202 |
//! 3. Call Open() on RFile to open file name 'Test1.txt' in test directory. |
|
203 |
//! 4. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
204 |
//! 5. Call NextL(). Call with parameter expected_file to make this function loop until neccessary file found in |
|
205 |
//! CFileList being returned by function. |
|
206 |
//! 6. Call ThreadId() on TOpenFileScan. |
|
207 |
//! 7. Delete TOpenFileScan object. |
|
208 |
//! 8. Delete RFs object. |
|
209 |
//! |
|
210 |
//! For thread 2: |
|
211 |
//! 1. Create RFs object. |
|
212 |
//! 2. Call Connect() on RFs. |
|
213 |
//! 3. Call Open() on RFile to open file name 'Test2.txt' in test directory. |
|
214 |
//! 4. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
215 |
//! 5. Call NextL(). Call with parameter expected_file to make this function loop until neccessary file found in |
|
216 |
//! CFileList being returned by function. |
|
217 |
//! 6. Call ThreadId() on TOpenFileScan. |
|
218 |
//! 7. Delete TOpenFileScan object. |
|
219 |
//! 8. Delete RFs object. |
|
220 |
//! |
|
221 |
//! @SYMTestStatus Implemented |
|
222 |
//! @SYMTestPriority Critical |
|
223 |
//! @SYMTestExpectedResults ThreadId() returns same value as got from CT_FsData suite using ThreadId() function for each thread. |
|
224 |
//! @SYMTestType CIT |
|
225 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
226 |
CREATE_OBJECT RFs RFs1 |
|
227 |
CREATE_OBJECT CFileMan CFileMan1 |
|
228 |
COMMAND RFs1 new |
|
229 |
COMMAND RFs1 Connect |
|
230 |
COMMAND RFs1 MkDirAll PathToRamDir |
|
231 |
COMMAND CFileMan1 NewL RFs1Used |
|
232 |
COMMAND CFileMan1 Copy CopyTest1 |
|
233 |
COMMAND CFileMan1 Copy CopyTest2 |
|
234 |
COMMAND CFileMan1 ~ |
|
235 |
COMMAND RFs1 ~ |
|
236 |
END_TEST_BLOCK |
|
237 |
CONCURRENT |
|
238 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
239 |
CREATE_OBJECT RFs RFs1 |
|
240 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
241 |
CREATE_OBJECT RFile RFile1 |
|
242 |
COMMAND RFs1 new |
|
243 |
COMMAND RFs1 Connect |
|
244 |
COMMAND RFile1 new |
|
245 |
COMMAND RFile1 Open filename1 |
|
246 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0003command4new |
|
247 |
COMMAND TOpenFileScan1 NextL look_for_file1 |
|
248 |
COMMAND TOpenFileScan1 ThreadId filesession_for_thread1 |
|
249 |
COMMAND TOpenFileScan1 ~ |
|
250 |
COMMAND RFs1 ~ |
|
251 |
COMMAND RFile1 Close |
|
252 |
COMMAND RFile1 ~ |
|
253 |
END_TEST_BLOCK |
|
254 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
255 |
CREATE_OBJECT RFs RFs2 |
|
256 |
CREATE_OBJECT TOpenFileScan TOpenFileScan2 |
|
257 |
CREATE_OBJECT RFile RFile2 |
|
258 |
COMMAND RFs2 new |
|
259 |
COMMAND RFs2 Connect |
|
260 |
COMMAND RFile2 new |
|
261 |
COMMAND RFile2 Open filename2 |
|
262 |
COMMAND TOpenFileScan2 new OpenFileScanNew |
|
263 |
COMMAND TOpenFileScan2 NextL look_for_file2 |
|
264 |
COMMAND TOpenFileScan2 ThreadId filesession_for_thread2 |
|
265 |
COMMAND TOpenFileScan2 ~ |
|
266 |
COMMAND RFs2 ~ |
|
267 |
COMMAND RFile2 Close |
|
268 |
COMMAND RFile2 ~ |
|
269 |
END_TEST_BLOCK |
|
270 |
CONSECUTIVE |
|
271 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
272 |
CREATE_OBJECT RFs RFs1 |
|
273 |
CREATE_OBJECT CFileMan CFileMan1 |
|
274 |
COMMAND RFs1 new |
|
275 |
COMMAND RFs1 Connect |
|
276 |
COMMAND CFileMan1 NewL RFs1Used |
|
277 |
COMMAND CFileMan1 Delete DeleteRamFiles |
|
278 |
COMMAND RFs1 RmDir PathToRamDir |
|
279 |
COMMAND CFileMan1 ~ |
|
280 |
COMMAND RFs1 ~ |
|
281 |
END_TEST_BLOCK |
|
282 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0005 |
|
283 |
||
284 |
START_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0006 |
|
285 |
//! @SYMTestCaseID PBASE-F32-OpenFileScan-PublicApi-0006 |
|
286 |
//! @SYMAPI TOpenFileScan |
|
287 |
//! @SYMTestCaseDesc ThreadId() test. |
|
288 |
//! Uses API elements: NextL(), ThreadId() |
|
289 |
//! @SYMTestActions 1. Create RFs object. |
|
290 |
//! 2. Call Connect() on RFs. |
|
291 |
//! 3. Call Open() on RFile1 to open file named 'Test1.txt' in test directory. |
|
292 |
//! 4. Call Open() on RFile2 to open file named 'Test2.txt' in test directory. |
|
293 |
//! 5. Create TOpenFileScan object passing a reference to the RFs object as a parameter. |
|
294 |
//! 6. Call NextL(). Call with parameter expected_file to make this function loop until neccessary file found in CFileList being returned by function. |
|
295 |
//! |
|
296 |
//! 7. Call ThreadId() on TOpenFileScan. |
|
297 |
//! 8. Delete RFile1 object |
|
298 |
//! 9. Delete RFile2 object. |
|
299 |
//! 8. Delete TOpenFileScan object. |
|
300 |
//! 9. Delete RFs object. |
|
301 |
//! |
|
302 |
//! @SYMTestStatus Implemented |
|
303 |
//! @SYMTestPriority Critical |
|
304 |
//! @SYMTestExpectedResults ThreadId() returns same value as got from CT_FsData suite using ThreadId() function. |
|
305 |
//! @SYMTestType CIT |
|
306 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
307 |
CREATE_OBJECT RFs RFs1 |
|
308 |
CREATE_OBJECT CFileMan CFileMan1 |
|
309 |
COMMAND RFs1 new |
|
310 |
COMMAND RFs1 Connect |
|
311 |
COMMAND RFs1 MkDirAll PathToRamDir |
|
312 |
COMMAND CFileMan1 NewL RFs1Used |
|
313 |
COMMAND CFileMan1 Copy CopyTest1 |
|
314 |
COMMAND CFileMan1 Copy CopyTest2 |
|
315 |
COMMAND CFileMan1 ~ |
|
316 |
COMMAND RFs1 ~ |
|
317 |
END_TEST_BLOCK |
|
318 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
319 |
CREATE_OBJECT RFs RFs1 |
|
320 |
CREATE_OBJECT TOpenFileScan TOpenFileScan1 |
|
321 |
CREATE_OBJECT RFile RFile1 |
|
322 |
CREATE_OBJECT RFile RFile2 |
|
323 |
COMMAND RFs1 new |
|
324 |
COMMAND RFs1 Connect |
|
325 |
COMMAND RFile1 new |
|
326 |
COMMAND RFile2 new |
|
327 |
COMMAND RFile1 Open filename1 |
|
328 |
COMMAND RFile2 Open filename3 |
|
329 |
COMMAND TOpenFileScan1 new PBASE-F32-OpenFileScan-PublicApi-0003command4new |
|
330 |
COMMAND TOpenFileScan1 NextL look_for_many_files |
|
331 |
COMMAND TOpenFileScan1 ThreadId filesession_for_thread1 |
|
332 |
COMMAND TOpenFileScan1 ~ |
|
333 |
COMMAND RFs1 ~ |
|
334 |
COMMAND RFile1 Close |
|
335 |
COMMAND RFile1 ~ |
|
336 |
COMMAND RFile2 Close |
|
337 |
COMMAND RFile2 ~ |
|
338 |
END_TEST_BLOCK |
|
339 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-OpenFileScan-PublicApi.ini |
|
340 |
CREATE_OBJECT RFs RFs1 |
|
341 |
CREATE_OBJECT CFileMan CFileMan1 |
|
342 |
COMMAND RFs1 new |
|
343 |
COMMAND RFs1 Connect |
|
344 |
COMMAND CFileMan1 NewL RFs1Used |
|
345 |
COMMAND CFileMan1 Delete DeleteRamFiles |
|
346 |
COMMAND RFs1 RmDir PathToRamDir |
|
347 |
COMMAND CFileMan1 ~ |
|
348 |
COMMAND RFs1 ~ |
|
349 |
END_TEST_BLOCK |
|
350 |
END_TESTCASE PBASE-F32-OpenFileScan-PublicApi-0006 |
|
351 |