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, Jaanus Randveer |
|
20 |
//! @SYMCreationDate 12/10/2007 |
|
21 |
//! @SYMScriptDescription The test script contains API tests for the following functions of TEntryArray class: |
|
22 |
//! TEntryArray(); |
|
23 |
//! TInt Count() const; |
|
24 |
//! const TEntry &operator[](TInt anIndex) const; |
|
25 |
||
26 |
LOAD_SUITE T_SfSrv |
|
27 |
//DELAY 5000 |
|
28 |
||
29 |
||
30 |
START_TESTCASE PBASE-F32-EntryArray-PublicApi-0001 |
|
31 |
//! @SYMTestCaseID PBASE-F32-EntryArray-PublicApi-0001 |
|
32 |
//! @SYMAPI TEntryArray |
|
33 |
//! @SYMCreationDate 08/12/2006 |
|
34 |
//! @SYMTestCaseDesc TEntryArray() test. Tests for successful object creation. |
|
35 |
//! Uses API elements: TEntryArray() |
|
36 |
//! @SYMTestActions 1. Create TEntryArray object. |
|
37 |
//! |
|
38 |
//! @SYMTestStatus Implemented |
|
39 |
//! @SYMTestPriority Critical |
|
40 |
//! @SYMTestExpectedResults Function does not leave nor panic. |
|
41 |
//! @SYMTestType CIT |
|
42 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
43 |
CREATE_OBJECT TEntryArray TEntryArray1 |
|
44 |
COMMAND TEntryArray1 new |
|
45 |
COMMAND TEntryArray1 ~ |
|
46 |
END_TEST_BLOCK |
|
47 |
END_TESTCASE PBASE-F32-EntryArray-PublicApi-0001 |
|
48 |
||
49 |
||
50 |
START_TESTCASE PBASE-F32-EntryArray-PublicApi-0002 |
|
51 |
//! @SYMTestCaseID PBASE-F32-EntryArray-PublicApi-0002 |
|
52 |
//! @SYMAPI TEntryArray |
|
53 |
//! @SYMTestCaseDesc Count() test. Tests if Count() returns correct number of entries. |
|
54 |
//! Uses API elements: TEntryArray(), Count() |
|
55 |
//! @SYMTestActions 1. Create RFs object. |
|
56 |
//! 2. Create RDir object. |
|
57 |
//! 3. Create RFile object. |
|
58 |
//! 4. Create TEntryArray object. |
|
59 |
//! 5. Call Rfs::Connect(). |
|
60 |
//! 6. Creates files "test1.txt", "test2.txt" and "test3.txt" using RFile::Create(). |
|
61 |
//! 7. Close files "test1.txt", "test2.txt" and "test3.txt" using RFile::Close(). |
|
62 |
//! 8. Open the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Open(). |
|
63 |
//! 9. Read the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Read() and passing TEntryArray object as parameter. |
|
64 |
//! 10.Call RFs::Close() for closing "<RAM_DRIVE>:\EntryArray\" directory. |
|
65 |
//! 11.Call TEntryArray::Count(). |
|
66 |
//! 12.Delete files "test1.txt", "test2.txt" and "test3.txt" using RFs::Delete(). |
|
67 |
//! |
|
68 |
//! @SYMTestStatus Implemented |
|
69 |
//! @SYMTestPriority Critical |
|
70 |
//! @SYMTestExpectedResults Count() returns the number of files in the test directory. |
|
71 |
//! @SYMTestType CIT |
|
72 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
73 |
CREATE_OBJECT RFs RFs1 |
|
74 |
COMMAND RFs1 new |
|
75 |
COMMAND RFs1 Connect |
|
76 |
COMMAND RFs1 MkDirAll PBASE-F32-EntryArray-PublicApi-0002-001-MkDirAll_command004 |
|
77 |
COMMAND RFs1 ~ |
|
78 |
END_TEST_BLOCK |
|
79 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
80 |
CREATE_OBJECT RFs RFs1 |
|
81 |
CREATE_OBJECT RDir RDir1 |
|
82 |
CREATE_OBJECT RFile RFile1 |
|
83 |
CREATE_OBJECT TEntryArray TEntryArray1 |
|
84 |
COMMAND RFs1 new |
|
85 |
COMMAND RFile1 new |
|
86 |
COMMAND RDir1 new |
|
87 |
COMMAND TEntryArray1 new |
|
88 |
COMMAND RFs1 Connect |
|
89 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0002-002-CreateFile_command010 |
|
90 |
COMMAND RFile1 Close |
|
91 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0002-002-CreateFile_command012 |
|
92 |
COMMAND RFile1 Close |
|
93 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0002-002-CreateFile_command014 |
|
94 |
COMMAND RFile1 Close |
|
95 |
COMMAND RDir1 Open PBASE-F32-EntryArray-PublicApi-0002-002-OpenDir_command016 |
|
96 |
COMMAND !Error=-25 RDir1 Read PBASE-F32-EntryArray-PublicApi-0002-002-Read_command017 |
|
97 |
COMMAND RDir1 Close |
|
98 |
COMMAND TEntryArray1 count PBASE-F32-EntryArray-PublicApi-0002-002-Count_command019 |
|
99 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0002-002-DeleteFile_command020 |
|
100 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0002-002-DeleteFile_command021 |
|
101 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0002-002-DeleteFile_command022 |
|
102 |
COMMAND TEntryArray1 ~ |
|
103 |
COMMAND RFile1 ~ |
|
104 |
COMMAND RDir1 ~ |
|
105 |
COMMAND RFs1 ~ |
|
106 |
END_TEST_BLOCK |
|
107 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
108 |
CREATE_OBJECT RFs RFs1 |
|
109 |
COMMAND RFs1 new |
|
110 |
COMMAND RFs1 Connect |
|
111 |
COMMAND RFs1 RmDir PBASE-F32-EntryArray-PublicApi-0002-003-RmDir_command004 |
|
112 |
COMMAND RFs1 ~ |
|
113 |
END_TEST_BLOCK |
|
114 |
END_TESTCASE PBASE-F32-EntryArray-PublicApi-0002 |
|
115 |
||
116 |
||
117 |
START_TESTCASE PBASE-F32-EntryArray-PublicApi-0003 |
|
118 |
//! @SYMTestCaseID PBASE-F32-EntryArray-PublicApi-0003 |
|
119 |
//! @SYMAPI TEntryArray |
|
120 |
//! @SYMTestCaseDesc operator[] test. This tests successful accessing all of the elements in the array. |
|
121 |
//! Uses API elements: TEntry(), TEntryArray(), operator[] |
|
122 |
//! @SYMTestActions 1. Create RFs object. |
|
123 |
//! 2. Create RDir object. |
|
124 |
//! 3. Create RFile object. |
|
125 |
//! 4. Create TEntry object. |
|
126 |
//! 5. Create TEntry temp object. |
|
127 |
//! 6. Create TEntryArray object. |
|
128 |
//! 7. Call Rfs::Connect(). |
|
129 |
//! 8. Creates files "test1.txt", "test2.txt" and "test3.txt" using RFile::Create(). |
|
130 |
//! 9. Close files "test1.txt", "test2.txt" and "test3.txt" using RFile::Close(). |
|
131 |
//! 10.Open the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Open(). |
|
132 |
//! 11.Read the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Read() and passing TEntryArray object as parameter. |
|
133 |
//! 12.Call RFs::Close() for closing "<RAM_DRIVE>:\EntryArray\" directory. |
|
134 |
//! 13.Call TEntryArray::Operatorp[] and pass index "0" as parameter. |
|
135 |
//! 14.Assign TEntry object to temp TEntry and check that the element temp TEntry has a name "Test1.txt" |
|
136 |
//! 15.Call TEntryArray::Operator[] and pass index "1" as parameter. |
|
137 |
//! 16.Assign TEntry object to temp TEntry and check that the element temp TEntry has a name "Test2.txt" |
|
138 |
//! 17.Call TEntryArray::Operator[] and pass index "2" as parameter. |
|
139 |
//! 18.Assign TEntry object to temp TEntry and check that the element temp TEntry has a name "Test3.txt" |
|
140 |
//! 19.Delete files "test1.txt", "test2.txt" and "test3.txt" using RFs::Delete(). |
|
141 |
//! |
|
142 |
//! @SYMTestStatus Implemented |
|
143 |
//! @SYMTestPriority Critical |
|
144 |
//! @SYMTestExpectedResults Function does not leave nor panic. |
|
145 |
//! @SYMTestType CIT |
|
146 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
147 |
CREATE_OBJECT RFs RFs1 |
|
148 |
COMMAND RFs1 new |
|
149 |
COMMAND RFs1 Connect |
|
150 |
COMMAND RFs1 MkDirAll PBASE-F32-EntryArray-PublicApi-0003-001-MkDirAll_command004 |
|
151 |
COMMAND RFs1 ~ |
|
152 |
END_TEST_BLOCK |
|
153 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
154 |
CREATE_OBJECT RFs RFs1 |
|
155 |
CREATE_OBJECT RDir RDir1 |
|
156 |
CREATE_OBJECT RFile RFile1 |
|
157 |
CREATE_OBJECT TEntry TEntry1 |
|
158 |
CREATE_OBJECT TEntry TEntryTemp |
|
159 |
CREATE_OBJECT TEntryArray TEntryArray1 |
|
160 |
COMMAND RFs1 new |
|
161 |
COMMAND RFile1 new |
|
162 |
COMMAND RDir1 new |
|
163 |
COMMAND TEntry1 new |
|
164 |
COMMAND TEntryTemp new |
|
165 |
COMMAND TEntryArray1 new |
|
166 |
COMMAND RFs1 Connect |
|
167 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0003-002-CreateFile_command014 |
|
168 |
COMMAND RFile1 Close |
|
169 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0003-002-CreateFile_command016 |
|
170 |
COMMAND RFile1 Close |
|
171 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0003-002-CreateFile_command018 |
|
172 |
COMMAND RFile1 Close |
|
173 |
COMMAND RDir1 Open PBASE-F32-EntryArray-PublicApi-0003-002-OpenDir_command020 |
|
174 |
COMMAND !Error=-25 RDir1 Read PBASE-F32-EntryArray-PublicApi-0003-002-Read_command021 |
|
175 |
COMMAND RDir1 Close |
|
176 |
COMMAND TEntryArray1 [] PBASE-F32-EntryArray-PublicApi-0003-002-brackets_command023 |
|
177 |
COMMAND TEntryTemp = PBASE-F32-EntryArray-PublicApi-0003-002-equal_command024 |
|
178 |
COMMAND TEntryArray1 [] PBASE-F32-EntryArray-PublicApi-0003-002-brackets_command025 |
|
179 |
COMMAND TEntryTemp = PBASE-F32-EntryArray-PublicApi-0003-002-equal_command026 |
|
180 |
COMMAND TEntryArray1 [] PBASE-F32-EntryArray-PublicApi-0003-002-brackets_command027 |
|
181 |
COMMAND TEntryTemp = PBASE-F32-EntryArray-PublicApi-0003-002-equal_command028 |
|
182 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0003-002-DeleteFile_command029 |
|
183 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0003-002-DeleteFile_command030 |
|
184 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0003-002-DeleteFile_command031 |
|
185 |
COMMAND TEntryArray1 ~ |
|
186 |
COMMAND TEntryTemp ~ |
|
187 |
COMMAND TEntry1 ~ |
|
188 |
COMMAND RFile1 ~ |
|
189 |
COMMAND RDir1 ~ |
|
190 |
COMMAND RFs1 ~ |
|
191 |
END_TEST_BLOCK |
|
192 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
193 |
CREATE_OBJECT RFs RFs1 |
|
194 |
COMMAND RFs1 new |
|
195 |
COMMAND RFs1 Connect |
|
196 |
COMMAND RFs1 RmDir PBASE-F32-EntryArray-PublicApi-0003-003-RmDir_command004 |
|
197 |
COMMAND RFs1 ~ |
|
198 |
END_TEST_BLOCK |
|
199 |
END_TESTCASE PBASE-F32-EntryArray-PublicApi-0003 |
|
200 |
||
201 |
||
202 |
START_TESTCASE PBASE-F32-EntryArray-PublicApi-0004 |
|
203 |
//! @SYMTestCaseID PBASE-F32-EntryArray-PublicApi-0004 |
|
204 |
//! @SYMAPI TEntryArray |
|
205 |
//! @SYMTestCaseDesc operator[] test. This tests for panic when accessing non-existant array element. |
|
206 |
//! Uses API elements: TEntry(), TEntryArray(), operator[] |
|
207 |
//! @SYMTestActions 1. Create RFs object. |
|
208 |
//! 2. Create RDir object. |
|
209 |
//! 3. Create RFile object. |
|
210 |
//! 4. Create TEntry object. |
|
211 |
//! 5. Create TEntryArray object. |
|
212 |
//! 6. Call Rfs::Connect(). |
|
213 |
//! 7. Creates files "test1.txt", "test2.txt" and "test3.txt" using RFile::Create(). |
|
214 |
//! 8. Close files "test1.txt", "test2.txt" and "test3.txt" using RFile::Close(). |
|
215 |
//! 9. Open the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Open(). |
|
216 |
//! 10.Read the contents of directory "<RAM_DRIVE>:\EntryArray\" using RDir::Read() and passing TEntryArray object as parameter. |
|
217 |
//! 11.Call RFs::Close() for closing "<RAM_DRIVE>:\EntryArray\" directory. |
|
218 |
//! 12.Assign an element of TEntryArray with index 3 to TEntry. |
|
219 |
//! 13.Delete files "test1.txt", "test2.txt" and "test3.txt" using RFs::Delete(). |
|
220 |
//! |
|
221 |
//! @SYMTestStatus Implemented |
|
222 |
//! @SYMTestPriority Critical |
|
223 |
//! @SYMTestExpectedResults Function panics with panic code FSCLIENT 22. |
|
224 |
//! @SYMTestType CIT |
|
225 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
226 |
CREATE_OBJECT RFs RFs1 |
|
227 |
COMMAND RFs1 new |
|
228 |
COMMAND RFs1 Connect |
|
229 |
COMMAND RFs1 MkDirAll PBASE-F32-EntryArray-PublicApi-0004-001-MkDirAll_command004 |
|
230 |
COMMAND RFs1 ~ |
|
231 |
END_TEST_BLOCK |
|
232 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
233 |
CREATE_OBJECT RFs RFs1 |
|
234 |
CREATE_OBJECT RDir RDir1 |
|
235 |
CREATE_OBJECT RFile RFile1 |
|
236 |
CREATE_OBJECT TEntry TEntry1 |
|
237 |
CREATE_OBJECT TEntryArray TEntryArray1 |
|
238 |
COMMAND RFs1 new |
|
239 |
COMMAND RFile1 new |
|
240 |
COMMAND RDir1 new |
|
241 |
COMMAND TEntry1 new |
|
242 |
COMMAND TEntryArray1 new |
|
243 |
COMMAND RFs1 Connect |
|
244 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0004-002-CreateFile_command012 |
|
245 |
COMMAND RFile1 Close |
|
246 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0004-002-CreateFile_command014 |
|
247 |
COMMAND RFile1 Close |
|
248 |
COMMAND RFile1 Create PBASE-F32-EntryArray-PublicApi-0004-002-CreateFile_command016 |
|
249 |
COMMAND RFile1 Close |
|
250 |
COMMAND RDir1 Open PBASE-F32-EntryArray-PublicApi-0004-002-OpenDir_command018 |
|
251 |
COMMAND !Error=-25 RDir1 Read PBASE-F32-EntryArray-PublicApi-0004-002-Read_command019 |
|
252 |
COMMAND RDir1 Close |
|
253 |
COMMAND TEntryArray1 [] PBASE-F32-EntryArray-PublicApi-0004-002-brackets_command021 |
|
254 |
COMMAND TEntryArray1 ~ |
|
255 |
COMMAND TEntry1 ~ |
|
256 |
COMMAND RFile1 ~ |
|
257 |
COMMAND RDir1 ~ |
|
258 |
COMMAND RFs1 ~ |
|
259 |
END_TEST_BLOCK !PanicCode=22 !PanicString="FSCLIENT panic" |
|
260 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-EntryArray-PublicApi.ini |
|
261 |
CREATE_OBJECT RFs RFs1 |
|
262 |
COMMAND RFs1 new |
|
263 |
COMMAND RFs1 Connect |
|
264 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0004-003-DeleteFile_command004 |
|
265 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0004-003-DeleteFile_command005 |
|
266 |
COMMAND RFs1 Delete PBASE-F32-EntryArray-PublicApi-0004-003-DeleteFile_command006 |
|
267 |
COMMAND RFs1 RmDir PBASE-F32-EntryArray-PublicApi-0004-003-RmDir_command007 |
|
268 |
COMMAND RFs1 ~ |
|
269 |
END_TEST_BLOCK |
|
270 |
END_TESTCASE PBASE-F32-EntryArray-PublicApi-0004 |