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 Alvar Udras |
|
20 |
//! @SYMScriptDescription The test script contains API tests for the following functions of RFile class: |
|
21 |
//! TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode); |
|
22 |
//! void Close(); |
|
23 |
//! TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode); |
|
24 |
//! TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode); |
|
25 |
//! TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode); |
|
26 |
//! TInt Read(TDes8 &aDes) const; |
|
27 |
//! void Read(TDes8 &aDes, TRequestStatus &aStatus) const; |
|
28 |
//! TInt Read(TDes8 &aDes, TInt aLength) const; |
|
29 |
//! void Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const; |
|
30 |
//! TInt Read(TInt aPos, TDes8 &aDes) const; |
|
31 |
//! void Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) const; |
|
32 |
//! TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const; |
|
33 |
//! void Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const; |
|
34 |
//! void ReadCancel(TRequestStatus &aStatus) const; |
|
35 |
//! void ReadCancel() const; |
|
36 |
//! TInt Write(const TDesC8 &aDes); |
|
37 |
//! void Write(const TDesC8 &aDes, TRequestStatus &aStatus); |
|
38 |
//! TInt Write(const TDesC8 &aDes, TInt aLength); |
|
39 |
//! void Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus); |
|
40 |
//! TInt Write(TInt aPos, const TDesC8 &aDes); |
|
41 |
//! void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus); |
|
42 |
//! TInt Write(TInt aPos, const TDesC8 &aDes, TInt aLength); |
|
43 |
//! void Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus); |
|
44 |
//! TInt Lock(TInt aPos, TInt aLength) const; |
|
45 |
//! TInt UnLock(TInt aPos, TInt aLength) const; |
|
46 |
//! TInt Seek(TSeek aMode, TInt &aPos) const; |
|
47 |
//! TInt Flush(); |
|
48 |
//! void Flush(TRequestStatus &aStatus); |
|
49 |
//! TInt Size(TInt &aSize) const; |
|
50 |
//! TInt SetSize(TInt aSize); |
|
51 |
//! TInt Att(TUint &aAttValue) const; |
|
52 |
//! TInt SetAtt(TUint aSetAttMask, TUint aClearAttMask); |
|
53 |
//! TInt Modified(TTime &aTime) const; |
|
54 |
//! TInt SetModified(const TTime &aTime); |
|
55 |
//! TInt Set(const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask); |
|
56 |
//! TInt ChangeMode(TFileMode aNewMode); |
|
57 |
//! TInt Rename(const TDesC &aNewName); |
|
58 |
//! TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const; |
|
59 |
//! TInt Name(TDes &aName) const; |
|
60 |
//! TInt Duplicate(const RFile &aFile, TOwnerType aType=EOwnerProcess); |
|
61 |
//! TInt FullName(TDes &aName) const; |
|
62 |
||
63 |
LOAD_SUITE T_SfSrv |
|
64 |
DELAY 1000 |
|
65 |
||
66 |
||
67 |
START_TESTCASE PBASE-F32-File-PublicApi-Install |
|
68 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-Install |
|
69 |
//! @SYMAPI RFile |
|
70 |
//! @SYMTestCaseDesc Setup the Environment to test RFile APIs by creating directories. |
|
71 |
//! @SYMTestActions 1. Rfs::New() to create Rfs Object. |
|
72 |
//! 2. Rfs::MkDirAll() to create directories required. |
|
73 |
//! @SYMTestStatus Implemented |
|
74 |
//! @SYMTestPriority Critical |
|
75 |
//! @SYMTestExpectedResults Directories get created. |
|
76 |
//! |
|
77 |
//! @SYMTestType CIT |
|
78 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
79 |
CREATE_OBJECT RFs RFs1 |
|
80 |
COMMAND RFs1 new |
|
81 |
COMMAND RFs1 Connect |
|
82 |
COMMAND RFs1 MkDirAll PBASE-F32-File-PublicApi-Install |
|
83 |
COMMAND RFs1 ~ |
|
84 |
END_TEST_BLOCK |
|
85 |
END_TESTCASE PBASE-F32-File-PublicApi-Install |
|
86 |
||
87 |
||
88 |
START_TESTCASE PBASE-F32-File-PublicApi-0001 |
|
89 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0001 |
|
90 |
//! @SYMAPI RFile |
|
91 |
//! @SYMTestCaseDesc Function Open() test. Open a file and close it. |
|
92 |
//! Uses API elements: Open(). |
|
93 |
//! @SYMTestActions 1. Create RFs session |
|
94 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc0001.txt", EFileShareAny | EFileWrite |
|
95 |
//! 3. Write "open test" to file. |
|
96 |
//! 4. Close file. |
|
97 |
//! 5. Open file "{Drives, RAMDriveTestPath}file\tc0001.txt", with EFileRead |
|
98 |
//! 6. Read from file to determine, that the file is opened. |
|
99 |
//! 7. Close file. |
|
100 |
//! 8. Delete file. |
|
101 |
//! 9. Close file system. |
|
102 |
//! |
|
103 |
//! @SYMTestStatus Implemented |
|
104 |
//! @SYMTestPriority Critical |
|
105 |
//! @SYMTestExpectedResults RFile::Open() returns KErrNone. File is opened after Open call. |
|
106 |
//! |
|
107 |
//! @SYMTestType CIT |
|
108 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
109 |
CREATE_OBJECT RFs RFs1 |
|
110 |
CREATE_OBJECT RFile file |
|
111 |
COMMAND RFs1 new |
|
112 |
COMMAND RFs1 Connect |
|
113 |
COMMAND file new |
|
114 |
COMMAND file Replace PBASE-F32-File-PublicApi-0001-001-Replace_command005 |
|
115 |
COMMAND file Write PBASE-F32-File-PublicApi-0001-001-Write_command006 |
|
116 |
COMMAND file Close |
|
117 |
COMMAND file Open PBASE-F32-File-PublicApi-0001-001-Open_command008 |
|
118 |
COMMAND file Read PBASE-F32-File-PublicApi-0001-001-Read_command009 |
|
119 |
COMMAND file Close |
|
120 |
COMMAND file ~ |
|
121 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0001-001-Delete_command013 |
|
122 |
COMMAND RFs1 ~ |
|
123 |
END_TEST_BLOCK |
|
124 |
END_TESTCASE PBASE-F32-File-PublicApi-0001 |
|
125 |
||
126 |
||
127 |
//FileModes - EFileRead |
|
128 |
||
129 |
||
130 |
START_TESTCASE PBASE-F32-File-PublicApi-4001 |
|
131 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-4001 |
|
132 |
//! @SYMAPI RFile |
|
133 |
//! @SYMTestCaseDesc Function TFileMode::EFileRead test. open file for reading and try to write to it. |
|
134 |
//! Uses API elements: Open(). |
|
135 |
//! @SYMTestActions 1. Create RFs session |
|
136 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4001.txt", EFileShareAny | EFileWrite |
|
137 |
//! 3. Close file. |
|
138 |
//! 4. Open file "{Drives, RAMDriveTestPath}file\tc4001.txt", with EFileRead |
|
139 |
//! 5. Write "test" to file. |
|
140 |
//! 6. Close file. |
|
141 |
//! 7. Delete file. |
|
142 |
//! 8. Close file system. |
|
143 |
//! |
|
144 |
//! @SYMTestStatus Implemented |
|
145 |
//! @SYMTestPriority Critical |
|
146 |
//! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied. |
|
147 |
//! |
|
148 |
//! @SYMTestType CIT |
|
149 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
150 |
CREATE_OBJECT RFs RFs1 |
|
151 |
CREATE_OBJECT RFile file |
|
152 |
COMMAND RFs1 new |
|
153 |
COMMAND RFs1 Connect |
|
154 |
COMMAND file new |
|
155 |
COMMAND file Replace PBASE-F32-File-PublicApi-4001-001-Replace_command005 |
|
156 |
COMMAND file Close |
|
157 |
COMMAND file Open PBASE-F32-File-PublicApi-4001-001-Open_command007 |
|
158 |
COMMAND !Error=-21 file Write PBASE-F32-File-PublicApi-4001-001-Write_command008 |
|
159 |
COMMAND file Close |
|
160 |
COMMAND file ~ |
|
161 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4001-001-Delete_command012 |
|
162 |
COMMAND RFs1 ~ |
|
163 |
END_TEST_BLOCK |
|
164 |
END_TESTCASE PBASE-F32-File-PublicApi-4001 |
|
165 |
||
166 |
||
167 |
//EFileShareExclusive |
|
168 |
||
169 |
||
170 |
START_TESTCASE PBASE-F32-File-PublicApi-4002 |
|
171 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-4002 |
|
172 |
//! @SYMAPI RFile |
|
173 |
//! @SYMTestCaseDesc Function TFileMode::EFileShareExclusive test. Open a file in EFileShareExclusive and try to open the same file through another handle. |
|
174 |
//! Uses API elements: Open(). |
|
175 |
//! @SYMTestActions 1. Create RFs session |
|
176 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4002.txt", EFileShareAny | EFileWrite. |
|
177 |
//! 3. Close file. |
|
178 |
//! 4. Open file "{Drives, RAMDriveTestPath}file\tc4002.txt", with EFileShareExclusive |
|
179 |
//! 5. Open "{Drives, RAMDriveTestPath}file\tc4002.txt" through new handle called file2, with EFileShareExlusive |
|
180 |
//! 6. Close file. |
|
181 |
//! 7. Delete file. |
|
182 |
//! 8. Close file system. |
|
183 |
//! |
|
184 |
//! @SYMTestStatus Implemented |
|
185 |
//! @SYMTestPriority Critical |
|
186 |
//! @SYMTestExpectedResults RFile::Open returns KErrInUse. |
|
187 |
//! |
|
188 |
//! @SYMTestType CIT |
|
189 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
190 |
CREATE_OBJECT RFs RFs1 |
|
191 |
CREATE_OBJECT RFile file |
|
192 |
CREATE_OBJECT RFile file2 |
|
193 |
COMMAND RFs1 new |
|
194 |
COMMAND RFs1 Connect |
|
195 |
COMMAND file new |
|
196 |
COMMAND file Replace PBASE-F32-File-PublicApi-4002-001-Replace_command005 |
|
197 |
COMMAND file Close |
|
198 |
COMMAND file Open PBASE-F32-File-PublicApi-4002-001-Open_command007 |
|
199 |
COMMAND file2 new |
|
200 |
COMMAND !Error=-14 file2 Open PBASE-F32-File-PublicApi-4002-001-Open_command010 |
|
201 |
COMMAND file2 Close |
|
202 |
COMMAND file2 ~ |
|
203 |
COMMAND file Close |
|
204 |
COMMAND file ~ |
|
205 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4002-001-Delete_command017 |
|
206 |
COMMAND RFs1 ~ |
|
207 |
END_TEST_BLOCK |
|
208 |
END_TESTCASE PBASE-F32-File-PublicApi-4002 |
|
209 |
||
210 |
||
211 |
//EFileShareReadersOnly |
|
212 |
||
213 |
||
214 |
START_TESTCASE PBASE-F32-File-PublicApi-4003 |
|
215 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-4003 |
|
216 |
//! @SYMAPI RFile |
|
217 |
//! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOnly test. Open a file in EFileShareReadersOnly and try to write to it through another handle. |
|
218 |
//! Uses API elements: Open(). |
|
219 |
//! @SYMTestActions 1. Create RFs session |
|
220 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4003.txt", EFileShareAny | EFileWrite |
|
221 |
//! 3. Write "open test" to file. |
|
222 |
//! 4. Close file. |
|
223 |
//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4003.txt", with EFileShareReadersOnly |
|
224 |
//! 6. Open "{Drives, RAMDriveTestPath}file\tc4003.txt" through new handle called file2 EFileRead. |
|
225 |
//! 7. Read from file. |
|
226 |
//! 8. Try to write "will cause error" to file. |
|
227 |
//! 9. Close file. |
|
228 |
//! 10. Delete file. |
|
229 |
//! 11. Close file system. |
|
230 |
//! |
|
231 |
//! @SYMTestStatus Implemented |
|
232 |
//! @SYMTestPriority Critical |
|
233 |
//! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied. |
|
234 |
//! |
|
235 |
//! @SYMTestType CIT |
|
236 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
237 |
CREATE_OBJECT RFs RFs1 |
|
238 |
CREATE_OBJECT RFile file |
|
239 |
CREATE_OBJECT RFile file2 |
|
240 |
COMMAND RFs1 new |
|
241 |
COMMAND RFs1 Connect |
|
242 |
COMMAND file new |
|
243 |
COMMAND file Replace PBASE-F32-File-PublicApi-4003-001-Replace_command005 |
|
244 |
COMMAND file Write PBASE-F32-File-PublicApi-4003-001-Write_command006 |
|
245 |
COMMAND file Close |
|
246 |
COMMAND file Open PBASE-F32-File-PublicApi-4003-001-Open_command008 |
|
247 |
COMMAND file2 new |
|
248 |
COMMAND file2 Open PBASE-F32-File-PublicApi-4003-001-Open_command011 |
|
249 |
COMMAND file2 Read PBASE-F32-File-PublicApi-4003-001-Read_command012 |
|
250 |
COMMAND !Error=-21 file2 Write PBASE-F32-File-PublicApi-4003-001-Write_command013 |
|
251 |
COMMAND file2 Close |
|
252 |
COMMAND file2 ~ |
|
253 |
COMMAND file Close |
|
254 |
COMMAND file ~ |
|
255 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4003-001-Delete_command020 |
|
256 |
COMMAND RFs1 ~ |
|
257 |
END_TEST_BLOCK |
|
258 |
END_TESTCASE PBASE-F32-File-PublicApi-4003 |
|
259 |
||
260 |
||
261 |
//EFileShareAny |
|
262 |
||
263 |
START_TESTCASE PBASE-F32-File-PublicApi-4004 |
|
264 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-4004 |
|
265 |
//! @SYMAPI RFile |
|
266 |
//! @SYMTestCaseDesc Function TFileMode::EFileShareAny test. Open a file in EFileShareAny and try to write to it through another handle. |
|
267 |
//! Uses API elements: Open(). |
|
268 |
//! @SYMTestActions 1. Create RFs session |
|
269 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4004.txt", EFileShareAny | EFileWrite |
|
270 |
//! 3. Write "open test" to file. |
|
271 |
//! 4. Close file. |
|
272 |
//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4004.txt", with EFileShareAny. |
|
273 |
//! 6. Open "{Drives, RAMDriveTestPath}file\tc4004.txt" through new handle called file2 EFileShareAny | EFileWrite. |
|
274 |
//! 7. Read from file. |
|
275 |
//! 8. Try to write "open test" to file. |
|
276 |
//! 9. Close file. |
|
277 |
//! 10. Delete file. |
|
278 |
//! 11. Close file system. |
|
279 |
//! |
|
280 |
//! @SYMTestStatus Implemented |
|
281 |
//! @SYMTestPriority Critical |
|
282 |
//! @SYMTestExpectedResults No error is returned or panic raised. |
|
283 |
//! |
|
284 |
//! @SYMTestType CIT |
|
285 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
286 |
CREATE_OBJECT RFs RFs1 |
|
287 |
CREATE_OBJECT RFile file |
|
288 |
CREATE_OBJECT RFile file2 |
|
289 |
COMMAND RFs1 new |
|
290 |
COMMAND RFs1 Connect |
|
291 |
COMMAND file new |
|
292 |
COMMAND file Replace PBASE-F32-File-PublicApi-4004-001-Replace_command005 |
|
293 |
COMMAND file Write PBASE-F32-File-PublicApi-4004-001-Write_command006 |
|
294 |
COMMAND file Close |
|
295 |
COMMAND file Open PBASE-F32-File-PublicApi-4004-001-Open_command008 |
|
296 |
COMMAND file2 new |
|
297 |
COMMAND file2 Open PBASE-F32-File-PublicApi-4004-001-Open_command011 |
|
298 |
COMMAND file2 Read PBASE-F32-File-PublicApi-4004-001-Read_command012 |
|
299 |
COMMAND file2 Write PBASE-F32-File-PublicApi-4004-001-Write_command013 |
|
300 |
COMMAND file2 Close |
|
301 |
COMMAND file2 ~ |
|
302 |
COMMAND file Close |
|
303 |
COMMAND file ~ |
|
304 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4004-001-Delete_command020 |
|
305 |
COMMAND RFs1 ~ |
|
306 |
END_TEST_BLOCK |
|
307 |
END_TESTCASE PBASE-F32-File-PublicApi-4004 |
|
308 |
||
309 |
//EFileShareReadersOfWriters |
|
310 |
||
311 |
START_TESTCASE PBASE-F32-File-PublicApi-4005 |
|
312 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-4005 |
|
313 |
//! @SYMAPI RFile |
|
314 |
//! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOrWriters test. Open a file in EFileShareReadersOrWriters and try to write to it through another handle. |
|
315 |
//! Uses API elements: Open(). |
|
316 |
//! @SYMTestActions 1. Create RFs session |
|
317 |
//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4005.txt", EFileShareAny | EFileWrite. |
|
318 |
//! 3. Write "open test" to file. |
|
319 |
//! 4. Close file. |
|
320 |
//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4005.txt", with EFileShareReadersOrWriters | EFileRead. |
|
321 |
//! 6. Open "{Drives, RAMDriveTestPath}file\tc4005.txt" through new handle called file2, EFileShareReadersOrWriters | EFileWrite. |
|
322 |
//! 7. Read from file. |
|
323 |
//! 8. Try to write "open test" to file. |
|
324 |
//! 9. Close file. |
|
325 |
//! 10. Delete file. |
|
326 |
//! 11. Close file system. |
|
327 |
//! |
|
328 |
//! @SYMTestStatus Implemented |
|
329 |
//! @SYMTestPriority Critical |
|
330 |
//! @SYMTestExpectedResults No errors returned or panics raised. |
|
331 |
//! |
|
332 |
//! @SYMTestType CIT |
|
333 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
334 |
CREATE_OBJECT RFs RFs1 |
|
335 |
CREATE_OBJECT RFile file |
|
336 |
CREATE_OBJECT RFile file2 |
|
337 |
COMMAND RFs1 new |
|
338 |
COMMAND RFs1 Connect |
|
339 |
COMMAND file new |
|
340 |
COMMAND file Replace PBASE-F32-File-PublicApi-4005-001-Replace_command005 |
|
341 |
COMMAND file Write PBASE-F32-File-PublicApi-4005-001-Write_command006 |
|
342 |
COMMAND file Close |
|
343 |
COMMAND file Open PBASE-F32-File-PublicApi-4005-001-Open_command008 |
|
344 |
COMMAND file2 new |
|
345 |
COMMAND file2 Open PBASE-F32-File-PublicApi-4005-001-Open_command011 |
|
346 |
COMMAND file2 Read PBASE-F32-File-PublicApi-4005-001-Read_command012 |
|
347 |
COMMAND file2 Write PBASE-F32-File-PublicApi-4005-001-Write_command013 |
|
348 |
COMMAND file2 Close |
|
349 |
COMMAND file2 ~ |
|
350 |
COMMAND file Close |
|
351 |
COMMAND file ~ |
|
352 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4005-001-Delete_command020 |
|
353 |
COMMAND RFs1 ~ |
|
354 |
END_TEST_BLOCK |
|
355 |
END_TESTCASE PBASE-F32-File-PublicApi-4005 |
|
356 |
||
357 |
START_TESTCASE PBASE-F32-File-PublicApi-0003 |
|
358 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0003 |
|
359 |
//! @SYMAPI RFile |
|
360 |
//! @SYMTestCaseDesc Function Create() test. Create a file. |
|
361 |
//! Uses API elements: Create(). |
|
362 |
//! @SYMTestActions 1. Create RFs session |
|
363 |
//! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0003.txt", EFileShareAny |
|
364 |
//! 3. Open the file. |
|
365 |
//! 4. Write literal "test created this file" to file. |
|
366 |
//! 5. Close RFile. |
|
367 |
//! 6. Delete file. |
|
368 |
//! 7. Close RFs. |
|
369 |
//! |
|
370 |
//! @SYMTestStatus Implemented |
|
371 |
//! @SYMTestPriority Critical |
|
372 |
//! @SYMTestExpectedResults RFile::Create() returns KErrNone. File is created. No panics raised or errors returned |
|
373 |
//! |
|
374 |
//! @SYMTestType CIT |
|
375 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
376 |
CREATE_OBJECT RFs RFs1 |
|
377 |
CREATE_OBJECT RFile file |
|
378 |
COMMAND RFs1 new |
|
379 |
COMMAND RFs1 Connect |
|
380 |
COMMAND file new |
|
381 |
COMMAND file Create PBASE-F32-File-PublicApi-0003-001-Create_command005 |
|
382 |
COMMAND file Write PBASE-F32-File-PublicApi-0003-001-Write_command006 |
|
383 |
COMMAND file Close |
|
384 |
COMMAND file ~ |
|
385 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0003-001-Delete_command010 |
|
386 |
COMMAND RFs1 ~ |
|
387 |
END_TEST_BLOCK |
|
388 |
END_TESTCASE PBASE-F32-File-PublicApi-0003 |
|
389 |
||
390 |
||
391 |
START_TESTCASE PBASE-F32-File-PublicApi-0004 |
|
392 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0004 |
|
393 |
//! @SYMAPI RFile |
|
394 |
//! @SYMTestCaseDesc Function Replace() test. Replace a file. |
|
395 |
//! Uses API elements: Replace(). |
|
396 |
//! @SYMTestActions 1. Create RFs session |
|
397 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0004.txt", EFileWrite |
|
398 |
//! 3. Call RFile::Write passing literal "This file is replaced" |
|
399 |
//! 4. Call Flush on file. |
|
400 |
//! 5. Close file. |
|
401 |
//! 6. Open file. |
|
402 |
//! 7. Read the file. |
|
403 |
//! 8. Close RFile. |
|
404 |
//! 9. Delete file. |
|
405 |
//! 10. Close RFs. |
|
406 |
//! |
|
407 |
//! @SYMTestStatus Implemented |
|
408 |
//! @SYMTestPriority Critical |
|
409 |
//! @SYMTestExpectedResults RFile::Replace returns KErrNone. File contains written literal and nothing else. |
|
410 |
//! |
|
411 |
//! @SYMTestType CIT |
|
412 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
413 |
CREATE_OBJECT RFs RFs1 |
|
414 |
CREATE_OBJECT RFile file |
|
415 |
COMMAND RFs1 new |
|
416 |
COMMAND RFs1 Connect |
|
417 |
COMMAND file new |
|
418 |
COMMAND file Replace PBASE-F32-File-PublicApi-0004-001-Replace_command005 |
|
419 |
COMMAND file Write PBASE-F32-File-PublicApi-0004-001-Write_command006 |
|
420 |
COMMAND file Flush |
|
421 |
COMMAND file Close |
|
422 |
COMMAND file Open PBASE-F32-File-PublicApi-0004-001-Open_command009 |
|
423 |
COMMAND file Read |
|
424 |
COMMAND file Close |
|
425 |
COMMAND file ~ |
|
426 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0004-001-Delete_command013 |
|
427 |
COMMAND RFs1 ~ |
|
428 |
END_TEST_BLOCK |
|
429 |
END_TESTCASE PBASE-F32-File-PublicApi-0004 |
|
430 |
||
431 |
||
432 |
START_TESTCASE PBASE-F32-File-PublicApi-0005 |
|
433 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0005 |
|
434 |
//! @SYMAPI RFile |
|
435 |
//! @SYMTestCaseDesc Function Temp() test. Create a temporary file. |
|
436 |
//! Uses API elements: Temp(). |
|
437 |
//! @SYMTestActions 1. Create RFs session |
|
438 |
//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileWrite |
|
439 |
//! 3. Call RFile::Write passing literal "This is temporary file" |
|
440 |
//! 4. Rename the file to "tc0005.txt". |
|
441 |
//! 5. Close RFile. |
|
442 |
//! 6. Delete temporary file. |
|
443 |
//! 7. Close RFs. |
|
444 |
//! |
|
445 |
//! @SYMTestStatus Implemented |
|
446 |
//! @SYMTestPriority Critical |
|
447 |
//! @SYMTestExpectedResults RFile::Temp() returns KErrNone, temporary file is created. |
|
448 |
//! |
|
449 |
//! @SYMTestType CIT |
|
450 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
451 |
CREATE_OBJECT RFs RFs1 |
|
452 |
CREATE_OBJECT RFile file |
|
453 |
COMMAND RFs1 new |
|
454 |
COMMAND RFs1 Connect |
|
455 |
COMMAND file new |
|
456 |
COMMAND file Temp PBASE-F32-File-PublicApi-0005-001-Temp_command005 |
|
457 |
COMMAND file Write PBASE-F32-File-PublicApi-0005-001-Write_command006 |
|
458 |
COMMAND file Rename PBASE-F32-File-PublicApi-0005-001-Rename_command007 |
|
459 |
COMMAND file Close |
|
460 |
COMMAND file ~ |
|
461 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0005-001-Delete_command011 |
|
462 |
COMMAND RFs1 ~ |
|
463 |
END_TEST_BLOCK |
|
464 |
END_TESTCASE PBASE-F32-File-PublicApi-0005 |
|
465 |
||
466 |
||
467 |
START_TESTCASE PBASE-F32-File-PublicApi-0006 |
|
468 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0006 |
|
469 |
//! @SYMAPI RFile |
|
470 |
//! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes) test - will open file and read its contents to a buffer. |
|
471 |
//! Uses API elements: Read(). |
|
472 |
//! @SYMTestActions 1. Create RFs session |
|
473 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0006.txt", EFileWrite |
|
474 |
//! 3. Call RFile::Write passing literal "Synchronous read test!". |
|
475 |
//! 4. Set the file position to 0. |
|
476 |
//! 5. Call RFile::Read(). |
|
477 |
//! 6. Close RFile. |
|
478 |
//! 7. Delete file. |
|
479 |
//! 8. Close RFs. |
|
480 |
//! |
|
481 |
//! @SYMTestStatus Implemented |
|
482 |
//! @SYMTestPriority Critical |
|
483 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. |
|
484 |
//! |
|
485 |
//! @SYMTestType CIT |
|
486 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
487 |
CREATE_OBJECT RFs RFs1 |
|
488 |
CREATE_OBJECT RFile file |
|
489 |
COMMAND RFs1 new |
|
490 |
COMMAND RFs1 Connect |
|
491 |
COMMAND file new |
|
492 |
COMMAND file Replace PBASE-F32-File-PublicApi-0006-001-Replace_command005 |
|
493 |
COMMAND file Write PBASE-F32-File-PublicApi-0006-001-Write_command006 |
|
494 |
COMMAND file Seek PBASE-F32-File-PublicApi-0006-001-Seek_command007 |
|
495 |
COMMAND file Read PBASE-F32-File-PublicApi-0006-001-Read_command008 |
|
496 |
COMMAND file Close |
|
497 |
COMMAND file ~ |
|
498 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0006-001-Delete_command012 |
|
499 |
COMMAND RFs1 ~ |
|
500 |
END_TEST_BLOCK |
|
501 |
END_TESTCASE PBASE-F32-File-PublicApi-0006 |
|
502 |
||
503 |
||
504 |
START_TESTCASE PBASE-F32-File-PublicApi-0007 |
|
505 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0007 |
|
506 |
//! @SYMAPI RFile |
|
507 |
//! @SYMTestCaseDesc Asynchronous Read(TDes8& aDes, TRequestStatus &aStatus) test - will open file and read its contents to a buffer. |
|
508 |
//! Uses API elements: Read(). |
|
509 |
//! @SYMTestActions 1. Create RFs session. |
|
510 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0007.txt", EFileWrite. |
|
511 |
//! 3. Call RFile::Write passing literal "asynchronous read test" |
|
512 |
//! 4. Reset file position |
|
513 |
//! 5. Call RFile::Read() passing TRequestStatus. |
|
514 |
//! 6. Wait until asynchronous call completes |
|
515 |
//! 7. Close RFile. |
|
516 |
//! 8. Delete file. |
|
517 |
//! 9. Close RFs. |
|
518 |
//! |
|
519 |
//! @SYMTestStatus Implemented |
|
520 |
//! @SYMTestPriority Critical |
|
521 |
//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. |
|
522 |
//! |
|
523 |
//! @SYMTestType CIT |
|
524 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
525 |
CREATE_OBJECT RFs RFs1 |
|
526 |
CREATE_OBJECT RFile file |
|
527 |
COMMAND RFs1 new |
|
528 |
COMMAND RFs1 Connect |
|
529 |
COMMAND file new |
|
530 |
COMMAND file Replace PBASE-F32-File-PublicApi-0007-001-Replace_command005 |
|
531 |
COMMAND file Write PBASE-F32-File-PublicApi-0007-001-Write_command006 |
|
532 |
COMMAND file Seek PBASE-F32-File-PublicApi-0007-001-Seek_command007 |
|
533 |
COMMAND file Read PBASE-F32-File-PublicApi-0007-001-Read_command008 |
|
534 |
OUTSTANDING |
|
535 |
COMMAND file Close |
|
536 |
COMMAND file ~ |
|
537 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0007-001-Delete_command012 |
|
538 |
COMMAND RFs1 ~ |
|
539 |
END_TEST_BLOCK |
|
540 |
END_TESTCASE PBASE-F32-File-PublicApi-0007 |
|
541 |
||
542 |
||
543 |
START_TESTCASE PBASE-F32-File-PublicApi-0008 |
|
544 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0008 |
|
545 |
//! @SYMAPI RFile |
|
546 |
//! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes, TInt aLength) test - will open file and read fixed length from its contents to a buffer. |
|
547 |
//! Uses API elements: Read(). |
|
548 |
//! @SYMTestActions 1. Create RFs session |
|
549 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0008.txt", EFileWrite |
|
550 |
//! 3. Write "synchronous read with length test" to file |
|
551 |
//! 4. Reset file position. |
|
552 |
//! 5. Call RFile::Read() passing TDesC, 5 for the length |
|
553 |
//! 6. Close RFile. |
|
554 |
//! 7. Delete file. |
|
555 |
//! 8. Close RFs. |
|
556 |
//! |
|
557 |
//! @SYMTestStatus Implemented |
|
558 |
//! @SYMTestPriority Critical |
|
559 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. |
|
560 |
//! |
|
561 |
//! @SYMTestType CIT |
|
562 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
563 |
CREATE_OBJECT RFs RFs1 |
|
564 |
CREATE_OBJECT RFile file |
|
565 |
COMMAND RFs1 new |
|
566 |
COMMAND RFs1 Connect |
|
567 |
COMMAND file new |
|
568 |
COMMAND file Replace PBASE-F32-File-PublicApi-0008-001-Replace_command005 |
|
569 |
COMMAND file Write PBASE-F32-File-PublicApi-0008-001-Write_command006 |
|
570 |
COMMAND file Seek PBASE-F32-File-PublicApi-0008-001-Seek_command007 |
|
571 |
COMMAND file Read PBASE-F32-File-PublicApi-0008-001-Read_command008 |
|
572 |
COMMAND file Close |
|
573 |
COMMAND file ~ |
|
574 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0008-001-Delete_command012 |
|
575 |
COMMAND RFs1 ~ |
|
576 |
END_TEST_BLOCK |
|
577 |
END_TESTCASE PBASE-F32-File-PublicApi-0008 |
|
578 |
||
579 |
||
580 |
START_TESTCASE PBASE-F32-File-PublicApi-0009 |
|
581 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0009 |
|
582 |
//! @SYMAPI RFile |
|
583 |
//! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read fixed length from its contents to a buffer. |
|
584 |
//! Uses API elements: Read(). |
|
585 |
//! @SYMTestActions 1. Create RFs session. |
|
586 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0009.txt", EFileWrite. |
|
587 |
//! 3. Call RFile::Write passing literal "Asynchronous read with length test" |
|
588 |
//! 4. Reset file position |
|
589 |
//! 4. Create TRequestStatus variable. |
|
590 |
//! 5. Call RFile::Read() passing TRequestStatus and 5 for length. |
|
591 |
//! 6. Wait until asynchronous call completes |
|
592 |
//! 7. Close RFile. |
|
593 |
//! 8. Delete file. |
|
594 |
//! 9. Close RFs. |
|
595 |
//! |
|
596 |
//! @SYMTestStatus Implemented |
|
597 |
//! @SYMTestPriority Critical |
|
598 |
//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. |
|
599 |
//! |
|
600 |
//! @SYMTestType CIT |
|
601 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
602 |
CREATE_OBJECT RFs RFs1 |
|
603 |
CREATE_OBJECT RFile file |
|
604 |
COMMAND RFs1 new |
|
605 |
COMMAND RFs1 Connect |
|
606 |
COMMAND file new |
|
607 |
COMMAND file Replace PBASE-F32-File-PublicApi-0009-001-Replace_command005 |
|
608 |
COMMAND file Write PBASE-F32-File-PublicApi-0009-001-Write_command006 |
|
609 |
COMMAND file Seek PBASE-F32-File-PublicApi-0009-001-Seek_command007 |
|
610 |
COMMAND file Read PBASE-F32-File-PublicApi-0009-001-Read_command008 |
|
611 |
OUTSTANDING |
|
612 |
COMMAND file Close |
|
613 |
COMMAND file ~ |
|
614 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0009-001-Delete_command012 |
|
615 |
COMMAND RFs1 ~ |
|
616 |
END_TEST_BLOCK |
|
617 |
END_TESTCASE PBASE-F32-File-PublicApi-0009 |
|
618 |
||
619 |
||
620 |
START_TESTCASE PBASE-F32-File-PublicApi-0010 |
|
621 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0010 |
|
622 |
//! @SYMAPI RFile |
|
623 |
//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes) test - will open file and read from given position its contents to a buffer. |
|
624 |
//! Uses API elements: Read(). |
|
625 |
//! @SYMTestActions 1. Create RFs session |
|
626 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0010.txt", EFileWrite |
|
627 |
//! 3. Write "synchronous read with position test" to file |
|
628 |
//! 4. Reset file position. |
|
629 |
//! 5. Call RFile::Read() passing 5 for position. |
|
630 |
//! 6. Close RFile. |
|
631 |
//! 7. Delete file. |
|
632 |
//! 8. Close RFs. |
|
633 |
//! |
|
634 |
//! @SYMTestStatus Implemented |
|
635 |
//! @SYMTestPriority Critical |
|
636 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. |
|
637 |
//! |
|
638 |
//! @SYMTestType CIT |
|
639 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
640 |
CREATE_OBJECT RFs RFs1 |
|
641 |
CREATE_OBJECT RFile file |
|
642 |
COMMAND RFs1 new |
|
643 |
COMMAND RFs1 Connect |
|
644 |
COMMAND file new |
|
645 |
COMMAND file Replace PBASE-F32-File-PublicApi-0010-001-Replace_command005 |
|
646 |
COMMAND file Write PBASE-F32-File-PublicApi-0010-001-Write_command006 |
|
647 |
COMMAND file Seek PBASE-F32-File-PublicApi-0010-001-Seek_command007 |
|
648 |
COMMAND file Read PBASE-F32-File-PublicApi-0010-001-Read_command008 |
|
649 |
COMMAND file Close |
|
650 |
COMMAND file ~ |
|
651 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0010-001-Delete_command012 |
|
652 |
COMMAND RFs1 ~ |
|
653 |
END_TEST_BLOCK |
|
654 |
END_TESTCASE PBASE-F32-File-PublicApi-0010 |
|
655 |
||
656 |
||
657 |
START_TESTCASE PBASE-F32-File-PublicApi-0011 |
|
658 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0011 |
|
659 |
//! @SYMAPI RFile |
|
660 |
//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) test - will open file and read from given position its contents to a buffer. |
|
661 |
//! Uses API elements: Read(). |
|
662 |
//! @SYMTestActions 1. Create RFs session. |
|
663 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0011.txt", EFileWrite. |
|
664 |
//! 3. Call RFile::Write passing literal "asynchronous read with position test" |
|
665 |
//! 4. Reset file position |
|
666 |
//! 5. Call RFile::Read() passing TRequestStatus and 5 for position. |
|
667 |
//! 6. Wait until asynchronous call completes |
|
668 |
//! 7. Close RFile. |
|
669 |
//! 8. Delete file. |
|
670 |
//! 9. Close RFs. |
|
671 |
//! |
|
672 |
//! @SYMTestStatus Implemented |
|
673 |
//! @SYMTestPriority Critical |
|
674 |
//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. |
|
675 |
//! |
|
676 |
//! @SYMTestType CIT |
|
677 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
678 |
CREATE_OBJECT RFs RFs1 |
|
679 |
CREATE_OBJECT RFile file |
|
680 |
COMMAND RFs1 new |
|
681 |
COMMAND RFs1 Connect |
|
682 |
COMMAND file new |
|
683 |
COMMAND file Replace PBASE-F32-File-PublicApi-0011-001-Replace_command005 |
|
684 |
COMMAND file Write PBASE-F32-File-PublicApi-0011-001-Write_command006 |
|
685 |
COMMAND file Seek PBASE-F32-File-PublicApi-0011-001-Seek_command007 |
|
686 |
COMMAND file Read PBASE-F32-File-PublicApi-0011-001-Read_command008 |
|
687 |
OUTSTANDING |
|
688 |
COMMAND file Close |
|
689 |
COMMAND file ~ |
|
690 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0011-001-Delete_command012 |
|
691 |
COMMAND RFs1 ~ |
|
692 |
END_TEST_BLOCK |
|
693 |
END_TESTCASE PBASE-F32-File-PublicApi-0011 |
|
694 |
||
695 |
||
696 |
START_TESTCASE PBASE-F32-File-PublicApi-0012 |
|
697 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0012 |
|
698 |
//! @SYMAPI RFile |
|
699 |
//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test - will open file and read from given position fixed length of contents into a buffer. |
|
700 |
//! Uses API elements: Read(). |
|
701 |
//! @SYMTestActions 1. Create RFs session |
|
702 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0012.txt", EFileWrite |
|
703 |
//! 3. Write "synchronous read with length and position test" to file |
|
704 |
//! 4. Reset file position. |
|
705 |
//! 5. Call RFile::Read() passing 5 for length and 5 for position. |
|
706 |
//! 6. Close RFile. |
|
707 |
//! 7. Delete file. |
|
708 |
//! 8. Close RFs. |
|
709 |
//! |
|
710 |
//! @SYMTestStatus Implemented |
|
711 |
//! @SYMTestPriority Critical |
|
712 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. |
|
713 |
//! |
|
714 |
//! @SYMTestType CIT |
|
715 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
716 |
CREATE_OBJECT RFs RFs1 |
|
717 |
CREATE_OBJECT RFile file |
|
718 |
COMMAND RFs1 new |
|
719 |
COMMAND RFs1 Connect |
|
720 |
COMMAND file new |
|
721 |
COMMAND file Replace PBASE-F32-File-PublicApi-0012-001-Replace_command005 |
|
722 |
COMMAND file Write PBASE-F32-File-PublicApi-0012-001-Write_command006 |
|
723 |
COMMAND file Seek PBASE-F32-File-PublicApi-0012-001-Seek_command007 |
|
724 |
COMMAND file Read PBASE-F32-File-PublicApi-0012-001-Read_command008 |
|
725 |
COMMAND file Close |
|
726 |
COMMAND file ~ |
|
727 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0012-001-Delete_command012 |
|
728 |
COMMAND RFs1 ~ |
|
729 |
END_TEST_BLOCK |
|
730 |
END_TESTCASE PBASE-F32-File-PublicApi-0012 |
|
731 |
||
732 |
||
733 |
START_TESTCASE PBASE-F32-File-PublicApi-0013 |
|
734 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0013 |
|
735 |
//! @SYMAPI RFile |
|
736 |
//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read from given position fixed length of contents into a buffer. |
|
737 |
//! Uses API elements: Read(). |
|
738 |
//! @SYMTestActions 1. Create RFs session. |
|
739 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0013.txt", EFileWrite. |
|
740 |
//! 3. Call RFile::Write passing literal "asynchronous read with length and position test" |
|
741 |
//! 4. Reset file position |
|
742 |
//! 5. Call RFile::Read() passing TRequestStatus, 5 for length and 5 for position. |
|
743 |
//! 6. Wait until asynchronous call completes |
|
744 |
//! 7. Close RFile. |
|
745 |
//! 8. Delete file. |
|
746 |
//! 9. Close RFs. |
|
747 |
//! |
|
748 |
//! @SYMTestStatus Implemented |
|
749 |
//! @SYMTestPriority Critical |
|
750 |
//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. |
|
751 |
//! |
|
752 |
//! @SYMTestType CIT |
|
753 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
754 |
CREATE_OBJECT RFs RFs1 |
|
755 |
CREATE_OBJECT RFile file |
|
756 |
COMMAND RFs1 new |
|
757 |
COMMAND RFs1 Connect |
|
758 |
COMMAND file new |
|
759 |
COMMAND file Replace PBASE-F32-File-PublicApi-0013-001-Replace_command005 |
|
760 |
COMMAND file Write PBASE-F32-File-PublicApi-0013-001-Write_command006 |
|
761 |
COMMAND file Seek PBASE-F32-File-PublicApi-0013-001-Seek_command007 |
|
762 |
COMMAND file Read PBASE-F32-File-PublicApi-0013-001-Read_command008 |
|
763 |
OUTSTANDING |
|
764 |
COMMAND file Close |
|
765 |
COMMAND file ~ |
|
766 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0013-001-Delete_command011 |
|
767 |
COMMAND RFs1 ~ |
|
768 |
END_TEST_BLOCK |
|
769 |
END_TESTCASE PBASE-F32-File-PublicApi-0013 |
|
770 |
||
771 |
||
772 |
START_TESTCASE PBASE-F32-File-PublicApi-0014 |
|
773 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0014 |
|
774 |
//! @SYMAPI RFile |
|
775 |
//! @SYMTestCaseDesc Function ReadCancel(TRequestStatus aStatus) and EFileReadAsyncAll test. |
|
776 |
//! Uses API elements: ReadCancel(). |
|
777 |
//! @SYMTestActions 1. Create RFs session. |
|
778 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0014.txt", EFileWrite. |
|
779 |
//! 3. Write message "short data" to file. |
|
780 |
//! 4. Close file |
|
781 |
//! 5. Open fail again with EFileShareAny | EFileReadAsyncAll. |
|
782 |
//! 6. Call RFile::Read() passing TRequestStatus. |
|
783 |
//! 7. Call ReadCancel passing TRequestStatus. |
|
784 |
//! 8. Close RFile. |
|
785 |
//! 9. Delete file. |
|
786 |
//! 10. Close RFs. |
|
787 |
//! |
|
788 |
//! @SYMTestStatus Implemented |
|
789 |
//! @SYMTestPriority Critical |
|
790 |
//! @SYMTestExpectedResults TRequestStatus returns KErrCancel after ReadCancel. |
|
791 |
//! |
|
792 |
//! @SYMTestType CIT |
|
793 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
794 |
CREATE_OBJECT RFs RFs1 |
|
795 |
CREATE_OBJECT RFile file |
|
796 |
COMMAND RFs1 new |
|
797 |
COMMAND RFs1 Connect |
|
798 |
COMMAND file new |
|
799 |
COMMAND file Replace PBASE-F32-File-PublicApi-0014-001-Replace_command005 |
|
800 |
COMMAND file Write PBASE-F32-File-PublicApi-0014-001-Write_command006 |
|
801 |
COMMAND file Close |
|
802 |
COMMAND file Open PBASE-F32-File-PublicApi-0014-001-Open_command008 |
|
803 |
COMMAND file Seek PBASE-F32-File-PublicApi-0014-001-Seek_command009 |
|
804 |
COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0014-001-Read_command010 |
|
805 |
ASYNC_DELAY 5 |
|
806 |
COMMAND file ReadCancel |
|
807 |
COMMAND file ReadCancel |
|
808 |
OUTSTANDING |
|
809 |
COMMAND file Close |
|
810 |
COMMAND file ~ |
|
811 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0014-001-Delete_command015 |
|
812 |
COMMAND RFs1 ~ |
|
813 |
END_TEST_BLOCK |
|
814 |
END_TESTCASE PBASE-F32-File-PublicApi-0014 |
|
815 |
||
816 |
||
817 |
START_TESTCASE PBASE-F32-File-PublicApi-0015 |
|
818 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0015 |
|
819 |
//! @SYMAPI RFile |
|
820 |
//! @SYMTestCaseDesc Function ReadCancel() test, call two asynchronous reads consequently on the same file. |
|
821 |
//! Uses API elements: ReadCancel(). |
|
822 |
//! @SYMTestActions 1. Create RFs session. |
|
823 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0015.txt", EFileWrite. |
|
824 |
//! 3. Write message "short data" to file. |
|
825 |
//! 4. Close file |
|
826 |
//! 5. Open fail again with EFileShareAny | EFileReadAsyncAll. |
|
827 |
//! 6. Call RFile::Read() passing TRequestStatus. |
|
828 |
//! 7. Call RFile::Read() passing TRequestStatus. |
|
829 |
//! 8. Call ReadCancel. |
|
830 |
//! 9. Close RFile. |
|
831 |
//! 10. Delete file. |
|
832 |
//! 11. Close RFs. |
|
833 |
//! |
|
834 |
//! @SYMTestStatus Implemented |
|
835 |
//! @SYMTestPriority Critical |
|
836 |
//! @SYMTestExpectedResults Both TRequestStatuses return KErrCancel after ReadCancel. |
|
837 |
//! |
|
838 |
//! @SYMTestType CIT |
|
839 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
840 |
CREATE_OBJECT RFs RFs1 |
|
841 |
CREATE_OBJECT RFile file |
|
842 |
COMMAND RFs1 new |
|
843 |
COMMAND RFs1 Connect |
|
844 |
COMMAND file new |
|
845 |
COMMAND file Replace PBASE-F32-File-PublicApi-0015-001-Replace_command005 |
|
846 |
COMMAND file Write PBASE-F32-File-PublicApi-0015-001-Write_command006 |
|
847 |
COMMAND file Close |
|
848 |
COMMAND file Open PBASE-F32-File-PublicApi-0015-001-Open_command008 |
|
849 |
COMMAND file Seek PBASE-F32-File-PublicApi-0015-001-Seek_command009 |
|
850 |
COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command010 |
|
851 |
COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command011 |
|
852 |
ASYNC_DELAY 5 |
|
853 |
COMMAND file ReadCancel PBASE-F32-File-PublicApi-0015-001-ReadCancel_command012 |
|
854 |
OUTSTANDING |
|
855 |
COMMAND file Close |
|
856 |
COMMAND file ~ |
|
857 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0015-001-Delete_command016 |
|
858 |
COMMAND RFs1 ~ |
|
859 |
END_TEST_BLOCK |
|
860 |
END_TESTCASE PBASE-F32-File-PublicApi-0015 |
|
861 |
||
862 |
||
863 |
START_TESTCASE PBASE-F32-File-PublicApi-0016 |
|
864 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0016 |
|
865 |
//! @SYMAPI RFile |
|
866 |
//! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes) test - will open file and Write to it from given buffer. |
|
867 |
//! Uses API elements: Write(const TDesC8 &aDes). |
|
868 |
//! @SYMTestActions 1. Create RFs session |
|
869 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0016.txt", EFileWrite |
|
870 |
//! 3. Call RFile::Write() passing "Write test". |
|
871 |
//! 4. Reset file position |
|
872 |
//! 5. Read from file to verify it's content. |
|
873 |
//! 6. Close RFile. |
|
874 |
//! 7. Delete file. |
|
875 |
//! 8. Close RFs. |
|
876 |
//! |
|
877 |
//! @SYMTestStatus Implemented |
|
878 |
//! @SYMTestPriority Critical |
|
879 |
//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. |
|
880 |
//! |
|
881 |
//! @SYMTestType CIT |
|
882 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
883 |
CREATE_OBJECT RFs RFs1 |
|
884 |
CREATE_OBJECT RFile file |
|
885 |
COMMAND RFs1 new |
|
886 |
COMMAND RFs1 Connect |
|
887 |
COMMAND file new |
|
888 |
COMMAND file Replace PBASE-F32-File-PublicApi-0016-001-Replace_command005 |
|
889 |
COMMAND file Write PBASE-F32-File-PublicApi-0016-001-Write_command006 |
|
890 |
COMMAND file Flush |
|
891 |
COMMAND file Close |
|
892 |
COMMAND file Open PBASE-F32-File-PublicApi-0016-001-Open_command009 |
|
893 |
COMMAND file Read PBASE-F32-File-PublicApi-0016-001-Read_command010 |
|
894 |
COMMAND file Close |
|
895 |
COMMAND file ~ |
|
896 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0016-001-Delete_command014 |
|
897 |
COMMAND RFs1 ~ |
|
898 |
END_TEST_BLOCK |
|
899 |
END_TESTCASE PBASE-F32-File-PublicApi-0016 |
|
900 |
||
901 |
||
902 |
START_TESTCASE PBASE-F32-File-PublicApi-0017 |
|
903 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0017 |
|
904 |
//! @SYMAPI RFile |
|
905 |
//! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TRequestStatus &aStat) test - will open file and Write to it from given buffer. |
|
906 |
//! Uses API elements: Write(const TDesC8 &aDes, TRequestStatus &aStat). |
|
907 |
//! @SYMTestActions 1. Create RFs session. |
|
908 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0017.txt", EFileWrite. |
|
909 |
//! 3. Call RFile::Write() passing "Asynchronous write test" and TRequestStatus. |
|
910 |
//! 4. Wait for request to complete. |
|
911 |
//! 5. Reset file position |
|
912 |
//! 6. Read from file to verify it's content. |
|
913 |
//! 7. Close RFile. |
|
914 |
//! 8. Delete file. |
|
915 |
//! 9. Close RFs. |
|
916 |
//! |
|
917 |
//! @SYMTestStatus Implemented |
|
918 |
//! @SYMTestPriority Critical |
|
919 |
//! @SYMTestExpectedResults Write completes with KErrNone. File contains written data. |
|
920 |
//! |
|
921 |
//! @SYMTestType CIT |
|
922 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
923 |
CREATE_OBJECT RFs RFs1 |
|
924 |
CREATE_OBJECT RFile file |
|
925 |
COMMAND RFs1 new |
|
926 |
COMMAND RFs1 Connect |
|
927 |
COMMAND file new |
|
928 |
COMMAND file Replace PBASE-F32-File-PublicApi-0017-001-Replace_command005 |
|
929 |
COMMAND file Write PBASE-F32-File-PublicApi-0017-001-Write_command006 |
|
930 |
OUTSTANDING |
|
931 |
COMMAND file Flush |
|
932 |
COMMAND file Close |
|
933 |
COMMAND file Open PBASE-F32-File-PublicApi-0017-001-Open_command009 |
|
934 |
COMMAND file Read PBASE-F32-File-PublicApi-0017-001-Read_command010 |
|
935 |
COMMAND file Close |
|
936 |
COMMAND file ~ |
|
937 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0017-001-Delete_command014 |
|
938 |
COMMAND RFs1 ~ |
|
939 |
END_TEST_BLOCK |
|
940 |
END_TESTCASE PBASE-F32-File-PublicApi-0017 |
|
941 |
||
942 |
||
943 |
START_TESTCASE PBASE-F32-File-PublicApi-0018 |
|
944 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0018 |
|
945 |
//! @SYMAPI RFile |
|
946 |
//! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes, TInt aLength) test - will open file and Write to it fixed length bytes from given buffer. |
|
947 |
//! Uses API elements: Write(const TDesC8 &aDes, TInt aLength). |
|
948 |
//! @SYMTestActions 1. Create RFs session |
|
949 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0018.txt", EFileWrite |
|
950 |
//! 3. Call RFile::Write() passing "Synchronous write test with length", and 5 for length to write. |
|
951 |
//! 4. Reset file position |
|
952 |
//! 5. Read from file to verify it's content. |
|
953 |
//! 6. Close RFile. |
|
954 |
//! 7. Delete file. |
|
955 |
//! 8. Close RFs. |
|
956 |
//! |
|
957 |
//! @SYMTestStatus Implemented |
|
958 |
//! @SYMTestPriority Critical |
|
959 |
//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. |
|
960 |
//! |
|
961 |
//! @SYMTestType CIT |
|
962 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
963 |
CREATE_OBJECT RFs RFs1 |
|
964 |
CREATE_OBJECT RFile file |
|
965 |
COMMAND RFs1 new |
|
966 |
COMMAND RFs1 Connect |
|
967 |
COMMAND file new |
|
968 |
COMMAND file Replace PBASE-F32-File-PublicApi-0018-001-Replace_command005 |
|
969 |
COMMAND file Write PBASE-F32-File-PublicApi-0018-001-Write_command006 |
|
970 |
COMMAND file Flush |
|
971 |
COMMAND file Close |
|
972 |
COMMAND file Open PBASE-F32-File-PublicApi-0018-001-Open_command009 |
|
973 |
COMMAND file Read PBASE-F32-File-PublicApi-0018-001-Read_command010 |
|
974 |
COMMAND file Close |
|
975 |
COMMAND file ~ |
|
976 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0018-001-Delete_command014 |
|
977 |
COMMAND RFs1 ~ |
|
978 |
END_TEST_BLOCK |
|
979 |
END_TESTCASE PBASE-F32-File-PublicApi-0018 |
|
980 |
||
981 |
||
982 |
START_TESTCASE PBASE-F32-File-PublicApi-0019 |
|
983 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0019 |
|
984 |
//! @SYMAPI RFile |
|
985 |
//! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it fixed length bytes from given buffer. |
|
986 |
//! Uses API elements: Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus). |
|
987 |
//! @SYMTestActions 1. Create RFs session. |
|
988 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0019.txt", EFileWrite. |
|
989 |
//! 3. Call RFile::Write() passing "Asynchronous write test with length", 5 for length and TRequestStatus. |
|
990 |
//! 4. Wait for request to complete. |
|
991 |
//! 5. Reset file position |
|
992 |
//! 6. Read from file to verify it's content. |
|
993 |
//! 7. Close RFile. |
|
994 |
//! 8. Delete file. |
|
995 |
//! 9. Close RFs. |
|
996 |
//! |
|
997 |
//! @SYMTestStatus Implemented |
|
998 |
//! @SYMTestPriority Critical |
|
999 |
//! @SYMTestExpectedResults Write completes with KErrNone. File contains written data. |
|
1000 |
//! |
|
1001 |
//! @SYMTestType CIT |
|
1002 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1003 |
CREATE_OBJECT RFs RFs1 |
|
1004 |
CREATE_OBJECT RFile file |
|
1005 |
COMMAND RFs1 new |
|
1006 |
COMMAND RFs1 Connect |
|
1007 |
COMMAND file new |
|
1008 |
COMMAND file Replace PBASE-F32-File-PublicApi-0019-001-Replace_command005 |
|
1009 |
COMMAND file Write PBASE-F32-File-PublicApi-0019-001-Write_command006 |
|
1010 |
OUTSTANDING |
|
1011 |
COMMAND file Flush |
|
1012 |
COMMAND file Close |
|
1013 |
COMMAND file Open PBASE-F32-File-PublicApi-0019-001-Open_command009 |
|
1014 |
COMMAND file Read PBASE-F32-File-PublicApi-0019-001-Read_command010 |
|
1015 |
COMMAND file Close |
|
1016 |
COMMAND file ~ |
|
1017 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0019-001-Delete_command014 |
|
1018 |
COMMAND RFs1 ~ |
|
1019 |
END_TEST_BLOCK |
|
1020 |
END_TESTCASE PBASE-F32-File-PublicApi-0019 |
|
1021 |
||
1022 |
||
1023 |
START_TESTCASE PBASE-F32-File-PublicApi-0020 |
|
1024 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0020 |
|
1025 |
//! @SYMAPI RFile |
|
1026 |
//! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes) test - will open file and Write to it from given position. |
|
1027 |
//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes). |
|
1028 |
//! @SYMTestActions 1. Create RFs session |
|
1029 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0020.txt", EFileWrite |
|
1030 |
//! 4. Call RFile::Write() passing "Synchronous write test with position", and 2 for position to write from. |
|
1031 |
//! 5. Reset file position |
|
1032 |
//! 6. Read from file to verify it's content. |
|
1033 |
//! 7. Close RFile. |
|
1034 |
//! 8. Delete file. |
|
1035 |
//! 9. Close RFs. |
|
1036 |
//! |
|
1037 |
//! @SYMTestStatus Implemented |
|
1038 |
//! @SYMTestPriority Critical |
|
1039 |
//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. |
|
1040 |
//! |
|
1041 |
//! @SYMTestType CIT |
|
1042 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1043 |
CREATE_OBJECT RFs RFs1 |
|
1044 |
CREATE_OBJECT RFile file |
|
1045 |
COMMAND RFs1 new |
|
1046 |
COMMAND RFs1 Connect |
|
1047 |
COMMAND file new |
|
1048 |
COMMAND file Replace PBASE-F32-File-PublicApi-0020-001-Replace_command005 |
|
1049 |
COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command006 |
|
1050 |
COMMAND file Flush |
|
1051 |
COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command008 |
|
1052 |
COMMAND file Flush |
|
1053 |
COMMAND file Close |
|
1054 |
COMMAND file Open PBASE-F32-File-PublicApi-0020-001-Open_command011 |
|
1055 |
COMMAND file Read PBASE-F32-File-PublicApi-0020-001-Read_command012 |
|
1056 |
COMMAND file Close |
|
1057 |
COMMAND file ~ |
|
1058 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0020-001-Delete_command016 |
|
1059 |
COMMAND RFs1 ~ |
|
1060 |
END_TEST_BLOCK |
|
1061 |
END_TESTCASE PBASE-F32-File-PublicApi-0020 |
|
1062 |
||
1063 |
||
1064 |
START_TESTCASE PBASE-F32-File-PublicApi-0021 |
|
1065 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0021 |
|
1066 |
//! @SYMAPI RFile |
|
1067 |
//! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus) test - will open file and Write to it from given position. |
|
1068 |
//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). |
|
1069 |
//! @SYMTestActions 1. Create RFs session. |
|
1070 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0021.txt", EFileWrite. |
|
1071 |
//! 3. Call RFile::Write() passing "Asynchronous write test with position", 2 for position and TRequestStatus. |
|
1072 |
//! 4. Wait for request to complete. |
|
1073 |
//! 5. Reset file position |
|
1074 |
//! 6. Read from file to verify it's content. |
|
1075 |
//! 7. Close RFile. |
|
1076 |
//! 8. Delete file. |
|
1077 |
//! 9. Close RFs. |
|
1078 |
//! |
|
1079 |
//! @SYMTestStatus Implemented |
|
1080 |
//! @SYMTestPriority Critical |
|
1081 |
//! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data. |
|
1082 |
//! |
|
1083 |
//! @SYMTestType CIT |
|
1084 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1085 |
CREATE_OBJECT RFs RFs1 |
|
1086 |
CREATE_OBJECT RFile file |
|
1087 |
COMMAND RFs1 new |
|
1088 |
COMMAND RFs1 Connect |
|
1089 |
COMMAND file new |
|
1090 |
COMMAND file Replace PBASE-F32-File-PublicApi-0021-001-Replace_command005 |
|
1091 |
COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command006 |
|
1092 |
COMMAND file Flush |
|
1093 |
COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command008 |
|
1094 |
OUTSTANDING |
|
1095 |
COMMAND file Flush |
|
1096 |
COMMAND file Close |
|
1097 |
COMMAND file Open PBASE-F32-File-PublicApi-0021-001-Open_command011 |
|
1098 |
COMMAND file Read PBASE-F32-File-PublicApi-0021-001-Read_command012 |
|
1099 |
COMMAND file Close |
|
1100 |
COMMAND file ~ |
|
1101 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0021-001-Delete_command016 |
|
1102 |
COMMAND RFs1 ~ |
|
1103 |
END_TEST_BLOCK |
|
1104 |
END_TESTCASE PBASE-F32-File-PublicApi-0021 |
|
1105 |
||
1106 |
||
1107 |
START_TESTCASE PBASE-F32-File-PublicApi-0022 |
|
1108 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0022 |
|
1109 |
//! @SYMAPI RFile |
|
1110 |
//! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test - will open file and Write to it from given position and fixed length of bytes. |
|
1111 |
//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength). |
|
1112 |
//! @SYMTestActions 1. Create RFs session |
|
1113 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0022.txt", EFileWrite |
|
1114 |
//! 3. Call RFile::Write() passing "Synchronous write test with position, length", 2 for position and 4 for length to write from. |
|
1115 |
//! 4. Reset file position |
|
1116 |
//! 5. Read from file to verify it's content. |
|
1117 |
//! 6. Close RFile. |
|
1118 |
//! 7. Delete file. |
|
1119 |
//! 8. Close RFs. |
|
1120 |
//! |
|
1121 |
//! @SYMTestStatus Implemented |
|
1122 |
//! @SYMTestPriority Critical |
|
1123 |
//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. |
|
1124 |
//! |
|
1125 |
//! @SYMTestType CIT |
|
1126 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1127 |
CREATE_OBJECT RFs RFs1 |
|
1128 |
CREATE_OBJECT RFile file |
|
1129 |
COMMAND RFs1 new |
|
1130 |
COMMAND RFs1 Connect |
|
1131 |
COMMAND file new |
|
1132 |
COMMAND file Replace PBASE-F32-File-PublicApi-0022-001-Replace_command005 |
|
1133 |
COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command006 |
|
1134 |
COMMAND file Flush |
|
1135 |
COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command008 |
|
1136 |
COMMAND file Flush |
|
1137 |
COMMAND file Close |
|
1138 |
COMMAND file Open PBASE-F32-File-PublicApi-0022-001-Open_command011 |
|
1139 |
COMMAND file Read PBASE-F32-File-PublicApi-0022-001-Read_command012 |
|
1140 |
COMMAND file Close |
|
1141 |
COMMAND file ~ |
|
1142 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0022-001-Delete_command016 |
|
1143 |
COMMAND RFs1 ~ |
|
1144 |
END_TEST_BLOCK |
|
1145 |
END_TESTCASE PBASE-F32-File-PublicApi-0022 |
|
1146 |
||
1147 |
||
1148 |
START_TESTCASE PBASE-F32-File-PublicApi-0023 |
|
1149 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0023 |
|
1150 |
//! @SYMAPI RFile |
|
1151 |
//! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it from given position and fixed length of bytes. |
|
1152 |
//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus). |
|
1153 |
//! @SYMTestActions 1. Create RFs session. |
|
1154 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0023.txt", EFileWrite. |
|
1155 |
//! 3. Call RFile::Write() passing "Asynchronous write test with position, length",2 for position, 4 for length and TRequestStatus. |
|
1156 |
//! 4. Wait for request to complete. |
|
1157 |
//! 5. Reset file position |
|
1158 |
//! 6. Read from file to verify it's content. |
|
1159 |
//! 7. Close RFile. |
|
1160 |
//! 8. Delete file. |
|
1161 |
//! 9. Close RFs. |
|
1162 |
//! |
|
1163 |
//! @SYMTestStatus Implemented |
|
1164 |
//! @SYMTestPriority Critical |
|
1165 |
//! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data. |
|
1166 |
//! |
|
1167 |
//! @SYMTestType CIT |
|
1168 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1169 |
CREATE_OBJECT RFs RFs1 |
|
1170 |
CREATE_OBJECT RFile file |
|
1171 |
COMMAND RFs1 new |
|
1172 |
COMMAND RFs1 Connect |
|
1173 |
COMMAND file new |
|
1174 |
COMMAND file Replace PBASE-F32-File-PublicApi-0023-001-Replace_command005 |
|
1175 |
COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command006 |
|
1176 |
COMMAND file Flush |
|
1177 |
COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command008 |
|
1178 |
OUTSTANDING |
|
1179 |
COMMAND file Flush |
|
1180 |
COMMAND file Close |
|
1181 |
COMMAND file Open PBASE-F32-File-PublicApi-0023-001-Open_command011 |
|
1182 |
COMMAND file Read PBASE-F32-File-PublicApi-0023-001-Read_command012 |
|
1183 |
COMMAND file Close |
|
1184 |
COMMAND file ~ |
|
1185 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0023-001-Delete_command016 |
|
1186 |
COMMAND RFs1 ~ |
|
1187 |
END_TEST_BLOCK |
|
1188 |
END_TESTCASE PBASE-F32-File-PublicApi-0023 |
|
1189 |
||
1190 |
||
1191 |
START_TESTCASE PBASE-F32-File-PublicApi-0024 |
|
1192 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0024 |
|
1193 |
//! @SYMAPI RFile |
|
1194 |
//! @SYMTestCaseDesc Function Lock(), UnLock test - open a file and lock it, then try to read from it from another RFs. |
|
1195 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
1196 |
//! @SYMTestActions 1. Create RFs session |
|
1197 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0024.txt", EFileWrite, open file as fileOne. |
|
1198 |
//! 3. Write "Lock test" to file. |
|
1199 |
//! 4. Lock the file by Calling Lock() with pos=0 and length=3. |
|
1200 |
//! 5. open "{Drives, RAMDriveTestPath}file\tc0024.txt" as fileTwo. |
|
1201 |
//! 6. read from the fileTwo. |
|
1202 |
//! 7. read from fileOne. |
|
1203 |
//! 8. unlock fileOne by RFile::Unlock(), with pos=0 and length=3. |
|
1204 |
//! 9. read from fileTwo. |
|
1205 |
//! 10. Close fileOne. |
|
1206 |
//! 11. Close fileTwo. |
|
1207 |
//! 12. Delete file. |
|
1208 |
//! 13. Close first RFs. |
|
1209 |
//! |
|
1210 |
//! @SYMTestStatus Implemented |
|
1211 |
//! @SYMTestPriority Critical |
|
1212 |
//! @SYMTestExpectedResults When fileOne is locked reading of fileTwo returns KErrLocked, Lock() returns KErrNone, UnLock returns KErrNone. |
|
1213 |
//! After fileOne is unlocked Reading of fileTwo returns KErrNone. |
|
1214 |
//! |
|
1215 |
//! @SYMTestType CIT |
|
1216 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1217 |
CREATE_OBJECT RFs RFs1 |
|
1218 |
CREATE_OBJECT RFile file |
|
1219 |
CREATE_OBJECT RFile file2 |
|
1220 |
COMMAND RFs1 new |
|
1221 |
COMMAND RFs1 Connect |
|
1222 |
COMMAND file new |
|
1223 |
COMMAND file Replace PBASE-F32-File-PublicApi-0024-001-Replace_command005 |
|
1224 |
COMMAND file2 new |
|
1225 |
COMMAND file2 Open PBASE-F32-File-PublicApi-0024-001-Open_command008 |
|
1226 |
COMMAND file Write PBASE-F32-File-PublicApi-0024-001-Write_command010 |
|
1227 |
COMMAND file Lock PBASE-F32-File-PublicApi-0024-001-Lock_command011 |
|
1228 |
COMMAND !Error=-22 file2 Read |
|
1229 |
COMMAND file Read |
|
1230 |
COMMAND file UnLock PBASE-F32-File-PublicApi-0024-001-UnLock_command016 |
|
1231 |
COMMAND file2 Read |
|
1232 |
COMMAND file2 Close |
|
1233 |
COMMAND file2 ~ |
|
1234 |
COMMAND file Close |
|
1235 |
COMMAND file ~ |
|
1236 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0024-001-Delete_command025 |
|
1237 |
COMMAND RFs1 ~ |
|
1238 |
END_TEST_BLOCK |
|
1239 |
END_TESTCASE PBASE-F32-File-PublicApi-0024 |
|
1240 |
||
1241 |
||
1242 |
START_TESTCASE PBASE-F32-File-PublicApi-0025 |
|
1243 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0025 |
|
1244 |
//! @SYMAPI RFile |
|
1245 |
//! @SYMTestCaseDesc Function Seek() test - open a file and and get it's current position. |
|
1246 |
//! Uses API elements: Seek(), Read(). |
|
1247 |
//! @SYMTestActions 1. Create RFs session |
|
1248 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0025.txt", EFileWrite. |
|
1249 |
//! 3. Write "Should seek to pos here" to file. |
|
1250 |
//! 3. Call RFile::Seek passing ESeekStart, 19 |
|
1251 |
//! 4. Call RFile::Read; |
|
1252 |
//! 5. Close file. |
|
1253 |
//! 6. Delete file. |
|
1254 |
//! 7. Close RFs. |
|
1255 |
//! |
|
1256 |
//! @SYMTestStatus Implemented |
|
1257 |
//! @SYMTestPriority Critical |
|
1258 |
//! @SYMTestExpectedResults Seek() returns KErrNone, buffer contents equals string literal "here". |
|
1259 |
//! |
|
1260 |
//! @SYMTestType CIT |
|
1261 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1262 |
CREATE_OBJECT RFs RFs1 |
|
1263 |
CREATE_OBJECT RFile file |
|
1264 |
COMMAND RFs1 new |
|
1265 |
COMMAND RFs1 Connect |
|
1266 |
COMMAND file new |
|
1267 |
COMMAND file Replace PBASE-F32-File-PublicApi-0025-001-Replace_command005 |
|
1268 |
COMMAND file Write PBASE-F32-File-PublicApi-0025-001-Write_command006 |
|
1269 |
COMMAND file Seek PBASE-F32-File-PublicApi-0025-001-Seek_command007 |
|
1270 |
COMMAND file Read PBASE-F32-File-PublicApi-0025-001-Read_command008 |
|
1271 |
COMMAND file Close |
|
1272 |
COMMAND file ~ |
|
1273 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0025-001-Delete_command012 |
|
1274 |
COMMAND RFs1 ~ |
|
1275 |
END_TEST_BLOCK |
|
1276 |
END_TESTCASE PBASE-F32-File-PublicApi-0025 |
|
1277 |
||
1278 |
||
1279 |
START_TESTCASE PBASE-F32-File-PublicApi-0125 |
|
1280 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0125 |
|
1281 |
//! @SYMAPI RFile |
|
1282 |
//! @SYMTestCaseDesc Function Seek() test - test TSeek::ESeekCurrent. |
|
1283 |
//! Uses API elements: Seek(), Read(). |
|
1284 |
//! @SYMTestActions 1. Create RFs session |
|
1285 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0125.txt", EFileWrite. |
|
1286 |
//! 3. Write "Should seek to pos here" to file. |
|
1287 |
//! 3. Call RFile::Seek passing ESeekStart, 0 |
|
1288 |
//! 4. Call RFile::Read passing 7 for length. |
|
1289 |
//! 5. Call RFile::Seek passing ESeekCurrent, 5. |
|
1290 |
//! 6. Call RFile::Read(). |
|
1291 |
//! 7. Close file. |
|
1292 |
//! 8. Delete file. |
|
1293 |
//! 9. Close RFs. |
|
1294 |
//! |
|
1295 |
//! @SYMTestStatus Implemented |
|
1296 |
//! @SYMTestPriority Critical |
|
1297 |
//! @SYMTestExpectedResults Seek() returns KErrNone, step 6 returns "to pos here". |
|
1298 |
//! |
|
1299 |
//! @SYMTestType CIT |
|
1300 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1301 |
CREATE_OBJECT RFs RFs1 |
|
1302 |
CREATE_OBJECT RFile file |
|
1303 |
COMMAND RFs1 new |
|
1304 |
COMMAND RFs1 Connect |
|
1305 |
COMMAND file new |
|
1306 |
COMMAND file Replace PBASE-F32-File-PublicApi-0125-001-Replace_command005 |
|
1307 |
COMMAND file Write PBASE-F32-File-PublicApi-0125-001-Write_command006 |
|
1308 |
COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command007 |
|
1309 |
COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command008 |
|
1310 |
COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command009 |
|
1311 |
COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command010 |
|
1312 |
COMMAND file Close |
|
1313 |
COMMAND file ~ |
|
1314 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0125-001-Delete_command014 |
|
1315 |
COMMAND RFs1 ~ |
|
1316 |
END_TEST_BLOCK |
|
1317 |
END_TESTCASE PBASE-F32-File-PublicApi-0125 |
|
1318 |
||
1319 |
START_TESTCASE PBASE-F32-File-PublicApi-0026 |
|
1320 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0026 |
|
1321 |
//! @SYMAPI RFile |
|
1322 |
//! @SYMTestCaseDesc Function Flush() test - open file, write to it and then flush. |
|
1323 |
//! Uses API elements: Open(), Flush(), Write(). |
|
1324 |
//! @SYMTestActions 1. Create RFs session |
|
1325 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0026.txt", EFileWrite. |
|
1326 |
//! 5. Call RFile::Write() passing "This data should be flushed". |
|
1327 |
//! 4. Call RFile::Flush(); |
|
1328 |
//! 5. Close file. |
|
1329 |
//! 6. Close RFs. |
|
1330 |
//! |
|
1331 |
//! @SYMTestStatus Implemented |
|
1332 |
//! @SYMTestPriority Critical |
|
1333 |
//! @SYMTestExpectedResults RFile::Flush() returns KErrNone. File contains written data. |
|
1334 |
//! |
|
1335 |
//! @SYMTestType CIT |
|
1336 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1337 |
CREATE_OBJECT RFs RFs1 |
|
1338 |
CREATE_OBJECT RFile file |
|
1339 |
COMMAND RFs1 new |
|
1340 |
COMMAND RFs1 Connect |
|
1341 |
COMMAND file new |
|
1342 |
COMMAND file Replace PBASE-F32-File-PublicApi-0026-001-Replace_command005 |
|
1343 |
COMMAND file Write PBASE-F32-File-PublicApi-0026-001-Write_command006 |
|
1344 |
COMMAND file Flush |
|
1345 |
COMMAND file Seek PBASE-F32-File-PublicApi-0026-001-Seek_command008 |
|
1346 |
COMMAND file Read PBASE-F32-File-PublicApi-0026-001-Read_command009 |
|
1347 |
COMMAND file Close |
|
1348 |
COMMAND file ~ |
|
1349 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0026-001-Delete_command011 |
|
1350 |
COMMAND RFs1 ~ |
|
1351 |
END_TEST_BLOCK |
|
1352 |
END_TESTCASE PBASE-F32-File-PublicApi-0026 |
|
1353 |
||
1354 |
||
1355 |
START_TESTCASE PBASE-F32-File-PublicApi-0027 |
|
1356 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0027 |
|
1357 |
//! @SYMAPI RFile |
|
1358 |
//! @SYMTestCaseDesc Asynchronous Flush() test - open file, write to it and then flush. |
|
1359 |
//! Uses API elements: Open(), Flush(), Write(). |
|
1360 |
//! @SYMTestActions 1. Create RFs session. |
|
1361 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0027.txt", EFileWrite. |
|
1362 |
//! 3. Call RFile::Write() passing literal "This data should be flushed". |
|
1363 |
//! 4. Call RFile::Flush() passing TRequestStatus. |
|
1364 |
//! 5. Wait for request to complete. |
|
1365 |
//! 6. Close RFile. |
|
1366 |
//! 7. Delete file. |
|
1367 |
//! 8. Close RFs. |
|
1368 |
//! |
|
1369 |
//! @SYMTestStatus Implemented |
|
1370 |
//! @SYMTestPriority Critical |
|
1371 |
//! @SYMTestExpectedResults TRequestStatus returns KErrNone. File contains written data. |
|
1372 |
//! |
|
1373 |
//! @SYMTestType CIT |
|
1374 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1375 |
CREATE_OBJECT RFs RFs1 |
|
1376 |
CREATE_OBJECT RFile file |
|
1377 |
COMMAND RFs1 new |
|
1378 |
COMMAND RFs1 Connect |
|
1379 |
COMMAND file new |
|
1380 |
COMMAND file Replace PBASE-F32-File-PublicApi-0027-001-Replace_command005 |
|
1381 |
COMMAND file Write PBASE-F32-File-PublicApi-0027-001-Write_command006 |
|
1382 |
COMMAND file Flush PBASE-F32-File-PublicApi-0027-001-Flush_command007 |
|
1383 |
OUTSTANDING |
|
1384 |
COMMAND file Seek PBASE-F32-File-PublicApi-0027-001-Seek_command008 |
|
1385 |
COMMAND file Read PBASE-F32-File-PublicApi-0027-001-Read_command009 |
|
1386 |
COMMAND file Close |
|
1387 |
COMMAND file ~ |
|
1388 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0027-001-Delete_command011 |
|
1389 |
COMMAND RFs1 ~ |
|
1390 |
END_TEST_BLOCK |
|
1391 |
END_TESTCASE PBASE-F32-File-PublicApi-0027 |
|
1392 |
||
1393 |
||
1394 |
START_TESTCASE PBASE-F32-File-PublicApi-0028 |
|
1395 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0028 |
|
1396 |
//! @SYMAPI RFile |
|
1397 |
//! @SYMTestCaseDesc Function SetSize, Size() test - open file and set it's size, then get it. |
|
1398 |
//! Uses API elements: Open(), Flush(), Write(). |
|
1399 |
//! @SYMTestActions 1. Create RFs session. |
|
1400 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0028.txt", EFileWrite. |
|
1401 |
//! 3. Write literal "Size test this text should be truncated" to file. |
|
1402 |
//! 4. Call RFile::SetSize() passing it 10 for size. |
|
1403 |
//! 5. Call RFile::Size. |
|
1404 |
//! 6. Close RFile. |
|
1405 |
//! 7. Delete file. |
|
1406 |
//! 8. Close RFs. |
|
1407 |
//! |
|
1408 |
//! @SYMTestStatus Implemented |
|
1409 |
//! @SYMTestPriority Critical |
|
1410 |
//! @SYMTestExpectedResults RFile::Size, RFile::SetSize returns KErrNone(). aSize equals with the size of file. |
|
1411 |
//! |
|
1412 |
//! @SYMTestType CIT |
|
1413 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1414 |
CREATE_OBJECT RFs RFs1 |
|
1415 |
CREATE_OBJECT RFile file |
|
1416 |
COMMAND RFs1 new |
|
1417 |
COMMAND RFs1 Connect |
|
1418 |
COMMAND file new |
|
1419 |
COMMAND file Replace PBASE-F32-File-PublicApi-0028-001-Replace_command005 |
|
1420 |
COMMAND file Write PBASE-F32-File-PublicApi-0028-001-Write_command006 |
|
1421 |
COMMAND file SetSize PBASE-F32-File-PublicApi-0028-001-SetSize_command007 |
|
1422 |
COMMAND file Size PBASE-F32-File-PublicApi-0028-001-Size_command008 |
|
1423 |
COMMAND file Close |
|
1424 |
COMMAND file ~ |
|
1425 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0028-001-Delete_command012 |
|
1426 |
COMMAND RFs1 ~ |
|
1427 |
END_TEST_BLOCK |
|
1428 |
END_TESTCASE PBASE-F32-File-PublicApi-0028 |
|
1429 |
||
1430 |
||
1431 |
START_TESTCASE PBASE-F32-File-PublicApi-0029 |
|
1432 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0029 |
|
1433 |
//! @SYMAPI RFile |
|
1434 |
//! @SYMTestCaseDesc Function Att(), SetAtt test - open file and get it's attributes. |
|
1435 |
//! Uses API elements: Open(), Att(). |
|
1436 |
//! @SYMTestActions 1. Create RFs session. |
|
1437 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0029.txt", EFileWrite. |
|
1438 |
//! 3. Write "SetAtt test" to file. |
|
1439 |
//! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttReadOnly |
|
1440 |
//! 5. Flush data to file. |
|
1441 |
//! 6. Close file. |
|
1442 |
//! 7. Open file. |
|
1443 |
//! 8. Call RFile::Att(). |
|
1444 |
//! 9. Close RFile. |
|
1445 |
//! 10. Delete file. |
|
1446 |
//! 11. Close RFs. |
|
1447 |
//! |
|
1448 |
//! @SYMTestStatus Implemented |
|
1449 |
//! @SYMTestPriority Critical |
|
1450 |
//! @SYMTestExpectedResults RFile::Att(), RFile::SetAtt returns KErrNone, aAttValue & KEntryAttNormal equals KEntryAttNormal. |
|
1451 |
//! |
|
1452 |
//! @SYMTestType CIT |
|
1453 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1454 |
CREATE_OBJECT RFs RFs1 |
|
1455 |
CREATE_OBJECT RFile file |
|
1456 |
COMMAND RFs1 new |
|
1457 |
COMMAND RFs1 Connect |
|
1458 |
COMMAND file new |
|
1459 |
COMMAND file Replace PBASE-F32-File-PublicApi-0029-001-Replace_command005 |
|
1460 |
COMMAND file Write PBASE-F32-File-PublicApi-0029-001-Write_command006 |
|
1461 |
COMMAND file SetAtt PBASE-F32-File-PublicApi-0029-001-SetAtt_command007 |
|
1462 |
COMMAND file Flush |
|
1463 |
COMMAND file Close |
|
1464 |
COMMAND file Open PBASE-F32-File-PublicApi-0029-001-Open_command010 |
|
1465 |
COMMAND file Att PBASE-F32-File-PublicApi-0029-001-Att_command011 |
|
1466 |
COMMAND file Close |
|
1467 |
COMMAND file ~ |
|
1468 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0029-001-Delete_command015 |
|
1469 |
COMMAND RFs1 ~ |
|
1470 |
END_TEST_BLOCK |
|
1471 |
END_TESTCASE PBASE-F32-File-PublicApi-0029 |
|
1472 |
||
1473 |
||
1474 |
START_TESTCASE PBASE-F32-File-PublicApi-0030 |
|
1475 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0030 |
|
1476 |
//! @SYMAPI RFile |
|
1477 |
//! @SYMTestCaseDesc Function Modified(), SetModified test - open file and get/set it's modification time. |
|
1478 |
//! Uses API elements: Open(), Modified(), SetModified(). |
|
1479 |
//! @SYMTestActions 1. Create RFs session. |
|
1480 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0030.txt", EFileWrite. |
|
1481 |
//! 3. Call RFile::SetModified, passing 20070118: |
|
1482 |
//! 4. Close the file. |
|
1483 |
//! 5. Open the file. |
|
1484 |
//! 6. Call RFile::Modified(). |
|
1485 |
//! 7. Close RFile. |
|
1486 |
//! 8. Delete file. |
|
1487 |
//! 9. Close RFs. |
|
1488 |
//! |
|
1489 |
//! @SYMTestStatus Implemented |
|
1490 |
//! @SYMTestPriority Critical |
|
1491 |
//! @SYMTestExpectedResults RFile::Modified(), RFile::SetModified returns KErrNone. Modified returns same date as was set with SetModified. |
|
1492 |
//! |
|
1493 |
//! @SYMTestType CIT |
|
1494 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1495 |
CREATE_OBJECT RFs RFs1 |
|
1496 |
CREATE_OBJECT RFile file |
|
1497 |
COMMAND RFs1 new |
|
1498 |
COMMAND RFs1 Connect |
|
1499 |
COMMAND file new |
|
1500 |
COMMAND file Replace PBASE-F32-File-PublicApi-0030-001-Replace_command005 |
|
1501 |
COMMAND file SetModified PBASE-F32-File-PublicApi-0030-001-SetModified_command006 |
|
1502 |
COMMAND file Close |
|
1503 |
COMMAND file Open PBASE-F32-File-PublicApi-0030-001-Open_command008 |
|
1504 |
COMMAND file Modified PBASE-F32-File-PublicApi-0030-001-Modified_command009 |
|
1505 |
COMMAND file Close |
|
1506 |
COMMAND file ~ |
|
1507 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0030-001-Delete_command012 |
|
1508 |
COMMAND RFs1 ~ |
|
1509 |
END_TEST_BLOCK |
|
1510 |
END_TESTCASE PBASE-F32-File-PublicApi-0030 |
|
1511 |
||
1512 |
||
1513 |
START_TESTCASE PBASE-F32-File-PublicApi-0031 |
|
1514 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0031 |
|
1515 |
//! @SYMAPI RFile |
|
1516 |
//! @SYMTestCaseDesc Function Set() test - open file and set it's modification time and attributes. |
|
1517 |
//! Uses API elements: Open(), Set(), Modified(), Att(). |
|
1518 |
//! @SYMTestActions 1. Create RFs session. |
|
1519 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0031.txt", EFileShareAny. |
|
1520 |
//! 3. Call RFile::Set() passing it 20070118:, KEntryAttArchive, KEntryAttReadOnly. |
|
1521 |
//! 4. Call RFile::Modified() to validate modification date. |
|
1522 |
//! 5. Call RFile::Att() to validate attributes. |
|
1523 |
//! 6. Close RFile. |
|
1524 |
//! 7. Delete file. |
|
1525 |
//! 8. Close RFs. |
|
1526 |
//! |
|
1527 |
//! @SYMTestStatus Implemented |
|
1528 |
//! @SYMTestPriority Critical |
|
1529 |
//! @SYMTestExpectedResults RFile::Set() returns KErrNone. Data and attributes are validated. |
|
1530 |
//! |
|
1531 |
//! @SYMTestType CIT |
|
1532 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1533 |
CREATE_OBJECT RFs RFs1 |
|
1534 |
CREATE_OBJECT RFile file |
|
1535 |
COMMAND RFs1 new |
|
1536 |
COMMAND RFs1 Connect |
|
1537 |
COMMAND file new |
|
1538 |
COMMAND file Replace PBASE-F32-File-PublicApi-0031-001-Replace_command005 |
|
1539 |
COMMAND file Set PBASE-F32-File-PublicApi-0031-001-Set_command006 |
|
1540 |
COMMAND file Att PBASE-F32-File-PublicApi-0031-001-Att_command007 |
|
1541 |
COMMAND file Modified PBASE-F32-File-PublicApi-0031-001-Modified_command008 |
|
1542 |
COMMAND file Close |
|
1543 |
COMMAND file ~ |
|
1544 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0031-001-Delete_command012 |
|
1545 |
COMMAND RFs1 ~ |
|
1546 |
END_TEST_BLOCK |
|
1547 |
END_TESTCASE PBASE-F32-File-PublicApi-0031 |
|
1548 |
||
1549 |
||
1550 |
START_TESTCASE PBASE-F32-File-PublicApi-0032 |
|
1551 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0032 |
|
1552 |
//! @SYMAPI RFile |
|
1553 |
//! @SYMTestCaseDesc Function ChangeMode() test - open file and change it's access mode. |
|
1554 |
//! Uses API elements: Open(), SetModified(). |
|
1555 |
//! @SYMTestActions 1. Create RFs session. |
|
1556 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0032.txt". |
|
1557 |
//! 3. Close file. |
|
1558 |
//! 4. open the file in EFileShareExclusive mode. |
|
1559 |
//! 5. Call RFile::ChangeMode() passing it EFileShareReadersOnly. |
|
1560 |
//! 6. Close RFile. |
|
1561 |
//! 7. Delete file. |
|
1562 |
//! 8. Close RFs. |
|
1563 |
//! |
|
1564 |
//! @SYMTestStatus Implemented |
|
1565 |
//! @SYMTestPriority Critical |
|
1566 |
//! @SYMTestExpectedResults RFile::ChangeMode() returns KErrNone. Filemode is EFileSareReadersOnly. |
|
1567 |
//! |
|
1568 |
//! @SYMTestType CIT |
|
1569 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1570 |
CREATE_OBJECT RFs RFs1 |
|
1571 |
CREATE_OBJECT RFile file |
|
1572 |
COMMAND RFs1 new |
|
1573 |
COMMAND RFs1 Connect |
|
1574 |
COMMAND file new |
|
1575 |
COMMAND file Replace PBASE-F32-File-PublicApi-0032-001-Replace_command005 |
|
1576 |
COMMAND file Close |
|
1577 |
COMMAND file Open PBASE-F32-File-PublicApi-0032-001-Open_command007 |
|
1578 |
COMMAND file ChangeMode PBASE-F32-File-PublicApi-0032-001-ChangeMode_command008 |
|
1579 |
COMMAND file Close |
|
1580 |
COMMAND file ~ |
|
1581 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0032-001-Delete_command012 |
|
1582 |
COMMAND RFs1 ~ |
|
1583 |
END_TEST_BLOCK |
|
1584 |
END_TESTCASE PBASE-F32-File-PublicApi-0032 |
|
1585 |
||
1586 |
||
1587 |
START_TESTCASE PBASE-F32-File-PublicApi-0033 |
|
1588 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0033 |
|
1589 |
//! @SYMAPI RFile |
|
1590 |
//! @SYMTestCaseDesc Function Rename() test - open file and rename it. |
|
1591 |
//! Uses API elements: Open(), RFile::Rename(). |
|
1592 |
//! @SYMTestActions 1. Create RFs session. |
|
1593 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0033.txt", EFileShareExclusive | EFileWrite. |
|
1594 |
//! 3. Call RFile::Rename() passing it string literal "test_renamed.txt". |
|
1595 |
//! 4. Call RFile::Name. |
|
1596 |
//! 5. rename the file back to tc0033.txt |
|
1597 |
//! 6. Delete file. |
|
1598 |
//! 7. Close resources. |
|
1599 |
//! |
|
1600 |
//! @SYMTestStatus Implemented |
|
1601 |
//! @SYMTestPriority Critical |
|
1602 |
//! @SYMTestExpectedResults RFile::Rename() returns KErrNone. File is renamed. |
|
1603 |
//! |
|
1604 |
//! @SYMTestType CIT |
|
1605 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1606 |
CREATE_OBJECT RFs RFs1 |
|
1607 |
CREATE_OBJECT RFile file |
|
1608 |
COMMAND RFs1 new |
|
1609 |
COMMAND RFs1 Connect |
|
1610 |
COMMAND file new |
|
1611 |
COMMAND file Replace PBASE-F32-File-PublicApi-0033-001-Replace_command005 |
|
1612 |
COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command006 |
|
1613 |
COMMAND file Name |
|
1614 |
COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command008 |
|
1615 |
COMMAND file Close |
|
1616 |
COMMAND file ~ |
|
1617 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0033-001-Delete_command012 |
|
1618 |
COMMAND RFs1 ~ |
|
1619 |
END_TEST_BLOCK |
|
1620 |
END_TESTCASE PBASE-F32-File-PublicApi-0033 |
|
1621 |
||
1622 |
||
1623 |
START_TESTCASE PBASE-F32-File-PublicApi-0034 |
|
1624 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0034 |
|
1625 |
//! @SYMAPI RFile |
|
1626 |
//! @SYMTestCaseDesc Function Drive() test - open file and get it's drive info. |
|
1627 |
//! Uses API elements: RFile::Drive(). |
|
1628 |
//! @SYMTestActions 1. Create RFs session. |
|
1629 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0034.txt", EFileShareAny. |
|
1630 |
//! 3. Call RFile::Drive(). |
|
1631 |
//! 4. Close RFile. |
|
1632 |
//! 5. Delete file. |
|
1633 |
//! 6. Close RFs. |
|
1634 |
//! |
|
1635 |
//! @SYMTestStatus Implemented |
|
1636 |
//! @SYMTestPriority Critical |
|
1637 |
//! @SYMTestExpectedResults RFile::Drive() returns KErrNone. |
|
1638 |
//! |
|
1639 |
//! @SYMTestType CIT |
|
1640 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1641 |
CREATE_OBJECT RFs RFs1 |
|
1642 |
CREATE_OBJECT RFile file |
|
1643 |
COMMAND RFs1 new |
|
1644 |
COMMAND RFs1 Connect |
|
1645 |
COMMAND file new |
|
1646 |
COMMAND file Replace PBASE-F32-File-PublicApi-0034-001-Replace_command005 |
|
1647 |
COMMAND file Drive PBASE-F32-File-PublicApi-0034-001-Drive_command006 |
|
1648 |
COMMAND file Close |
|
1649 |
COMMAND file ~ |
|
1650 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0034-001-Delete_command010 |
|
1651 |
COMMAND RFs1 ~ |
|
1652 |
END_TEST_BLOCK |
|
1653 |
END_TESTCASE PBASE-F32-File-PublicApi-0034 |
|
1654 |
||
1655 |
||
1656 |
START_TESTCASE PBASE-F32-File-PublicApi-0039 |
|
1657 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0039 |
|
1658 |
//! @SYMAPI RFile |
|
1659 |
//! @SYMTestCaseDesc Function Name() test. Open a file and get it's name. |
|
1660 |
//! Uses API elements: Name(). |
|
1661 |
//! @SYMTestActions 1. Create RFs session |
|
1662 |
//! 2. Open file "{Drives, RAMDriveTestPath}file\tc0039.txt" as file1 |
|
1663 |
//! 3. Call RFile::Name(). |
|
1664 |
//! 4. Close file system. |
|
1665 |
//! 5. Delete file. |
|
1666 |
//! 6. Close file. |
|
1667 |
//! |
|
1668 |
//! @SYMTestStatus Implemented |
|
1669 |
//! @SYMTestPriority Critical |
|
1670 |
//! @SYMTestExpectedResults RFile::Name() returns KErrNone. File name is verified. |
|
1671 |
//! |
|
1672 |
//! @SYMTestType CIT |
|
1673 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1674 |
CREATE_OBJECT RFs RFs1 |
|
1675 |
CREATE_OBJECT RFile file |
|
1676 |
COMMAND RFs1 new |
|
1677 |
COMMAND RFs1 Connect |
|
1678 |
COMMAND file new |
|
1679 |
COMMAND file Replace PBASE-F32-File-PublicApi-0039-001-Replace_command005 |
|
1680 |
COMMAND file Name PBASE-F32-File-PublicApi-0039-001-Name_command006 |
|
1681 |
COMMAND file Close |
|
1682 |
COMMAND file ~ |
|
1683 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0039-001-Delete_command010 |
|
1684 |
COMMAND RFs1 ~ |
|
1685 |
END_TEST_BLOCK |
|
1686 |
END_TESTCASE PBASE-F32-File-PublicApi-0039 |
|
1687 |
||
1688 |
||
1689 |
START_TESTCASE PBASE-F32-File-PublicApi-0040 |
|
1690 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0040 |
|
1691 |
//! @SYMAPI RFile |
|
1692 |
//! @SYMTestCaseDesc Function Duplicate() test. Duplicate a file and compare it size to original. |
|
1693 |
//! Uses API elements: Duplicate(). |
|
1694 |
//! @SYMTestActions 1. Create RFs session |
|
1695 |
//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0040.txt" as file1, with EFileWrite permission |
|
1696 |
//! 3. Write "Duplicate Test" to file |
|
1697 |
//! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1. |
|
1698 |
//! 5. Read from file2 to verify that file1 has been duplicated. |
|
1699 |
//! 6. Close file1. |
|
1700 |
//! 7. Close file2. |
|
1701 |
//! 8. Delete file1 |
|
1702 |
//! 9. Close fs session. |
|
1703 |
//! |
|
1704 |
//! @SYMTestStatus Implemented |
|
1705 |
//! @SYMTestPriority Critical |
|
1706 |
//! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal. |
|
1707 |
//! |
|
1708 |
//! @SYMTestType CIT |
|
1709 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1710 |
CREATE_OBJECT RFs RFs1 |
|
1711 |
CREATE_OBJECT RFile file |
|
1712 |
CREATE_OBJECT RFile file2 |
|
1713 |
COMMAND RFs1 new |
|
1714 |
COMMAND RFs1 Connect |
|
1715 |
COMMAND file new |
|
1716 |
COMMAND file Replace PBASE-F32-File-PublicApi-0040-001-Replace_command005 |
|
1717 |
COMMAND file Write PBASE-F32-File-PublicApi-0040-001-Write_command006 |
|
1718 |
COMMAND file Seek PBASE-F32-File-PublicApi-0040-001-Seek_command007 |
|
1719 |
COMMAND file2 new |
|
1720 |
COMMAND file2 Duplicate PBASE-F32-File-PublicApi-0040-001-Duplicate_command010 |
|
1721 |
COMMAND file2 Read PBASE-F32-File-PublicApi-0040-001-Read_command011 |
|
1722 |
COMMAND file2 Close |
|
1723 |
COMMAND file2 ~ |
|
1724 |
COMMAND file Close |
|
1725 |
COMMAND file ~ |
|
1726 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0040-001-Delete_command017 |
|
1727 |
COMMAND RFs1 ~ |
|
1728 |
END_TEST_BLOCK |
|
1729 |
END_TESTCASE PBASE-F32-File-PublicApi-0040 |
|
1730 |
||
1731 |
||
1732 |
START_TESTCASE PBASE-F32-File-PublicApi-1040 |
|
1733 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1040 |
|
1734 |
//! @SYMAPI RFile |
|
1735 |
//! @SYMTestCaseDesc Function Duplicate() with aType = EOwnerThread test. Duplicate file and compare it size to original. |
|
1736 |
//! Uses API elements: Duplicate(). |
|
1737 |
//! @SYMTestActions 1. Create RFs session |
|
1738 |
//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc1040.txt" as file1, with EFileWrite permission |
|
1739 |
//! 3. Write "Duplicate Test" to file |
|
1740 |
//! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1. |
|
1741 |
//! 5. Read from file2 to verify that file1 has been duplicated. |
|
1742 |
//! 6. Close file1. |
|
1743 |
//! 7. Close file2. |
|
1744 |
//! 8. Delete file1. |
|
1745 |
//! 9. Close fs session. |
|
1746 |
//! |
|
1747 |
//! @SYMTestStatus Implemented |
|
1748 |
//! @SYMTestPriority Critical |
|
1749 |
//! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal. |
|
1750 |
//! |
|
1751 |
//! @SYMTestType CIT |
|
1752 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1753 |
CREATE_OBJECT RFs RFs1 |
|
1754 |
CREATE_OBJECT RFile file |
|
1755 |
CREATE_OBJECT RFile file2 |
|
1756 |
COMMAND RFs1 new |
|
1757 |
COMMAND RFs1 Connect |
|
1758 |
COMMAND file new |
|
1759 |
COMMAND file Replace PBASE-F32-File-PublicApi-1040-001-Replace_command005 |
|
1760 |
COMMAND file Write PBASE-F32-File-PublicApi-1040-001-Write_command006 |
|
1761 |
COMMAND file Seek PBASE-F32-File-PublicApi-1040-001-Seek_command007 |
|
1762 |
COMMAND file2 new |
|
1763 |
COMMAND file2 Duplicate PBASE-F32-File-PublicApi-1040-001-Duplicate_command010 |
|
1764 |
COMMAND file2 Read PBASE-F32-File-PublicApi-1040-001-Read_command011 |
|
1765 |
COMMAND file2 Close |
|
1766 |
COMMAND file2 ~ |
|
1767 |
COMMAND file Close |
|
1768 |
COMMAND file ~ |
|
1769 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1040-001-Delete_command017 |
|
1770 |
COMMAND RFs1 ~ |
|
1771 |
END_TEST_BLOCK |
|
1772 |
END_TESTCASE PBASE-F32-File-PublicApi-1040 |
|
1773 |
||
1774 |
||
1775 |
START_TESTCASE PBASE-F32-File-PublicApi-0041 |
|
1776 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0041 |
|
1777 |
//! @SYMAPI RFile |
|
1778 |
//! @SYMTestCaseDesc Function FullName() test. Open a file and get it's full name. |
|
1779 |
//! Uses API elements: FullName(). |
|
1780 |
//! @SYMTestActions 1. Create RFs session |
|
1781 |
//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0041.txt" |
|
1782 |
//! 3. Call FullName. |
|
1783 |
//! 4. Close file. |
|
1784 |
//! 5. Delete file. |
|
1785 |
//! 6. Close fs session. |
|
1786 |
//! |
|
1787 |
//! |
|
1788 |
//! @SYMTestStatus Implemented |
|
1789 |
//! @SYMTestPriority Critical |
|
1790 |
//! @SYMTestExpectedResults RFile::FullName returns KErrNone. Descriptor retrieved from FullName is equal to the path and name of the file. |
|
1791 |
//! |
|
1792 |
//! @SYMTestType CIT |
|
1793 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1794 |
CREATE_OBJECT RFs RFs1 |
|
1795 |
CREATE_OBJECT RFile file |
|
1796 |
COMMAND RFs1 new |
|
1797 |
COMMAND RFs1 Connect |
|
1798 |
COMMAND file new |
|
1799 |
COMMAND file Replace PBASE-F32-File-PublicApi-0041-001-Replace_command005 |
|
1800 |
COMMAND file FullName PBASE-F32-File-PublicApi-0041-001-FullName_command006 |
|
1801 |
COMMAND file Close |
|
1802 |
COMMAND file ~ |
|
1803 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0041-001-Delete_command010 |
|
1804 |
COMMAND RFs1 ~ |
|
1805 |
END_TEST_BLOCK |
|
1806 |
END_TESTCASE PBASE-F32-File-PublicApi-0041 |
|
1807 |
||
1808 |
||
1809 |
////////////////////////////////////////////////////////////////////// |
|
1810 |
////////////////////////////////////////////////////////////////////// |
|
1811 |
////// ////// |
|
1812 |
////// /////////////////////////////////// ////// |
|
1813 |
////// /// /// ////// |
|
1814 |
////// /// NEGATIVE TESTS /// ////// |
|
1815 |
////// /// /// ////// |
|
1816 |
////// /////////////////////////////////// ////// |
|
1817 |
////// ////// |
|
1818 |
////////////////////////////////////////////////////////////////////// |
|
1819 |
////////////////////////////////////////////////////////////////////// |
|
1820 |
||
1821 |
||
1822 |
START_TESTCASE PBASE-F32-File-PublicApi-0101 |
|
1823 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0101 |
|
1824 |
//! @SYMAPI RFile |
|
1825 |
//! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid path. |
|
1826 |
//! Uses API elements: Open(). |
|
1827 |
//! @SYMTestActions 1. Create RFs session |
|
1828 |
//! 2. Open file "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt" |
|
1829 |
//! 3. Close fs. |
|
1830 |
//! |
|
1831 |
//! @SYMTestStatus Implemented |
|
1832 |
//! @SYMTestPriority Critical |
|
1833 |
//! @SYMTestExpectedResults open returns KErrPathNotFound! on step 2. |
|
1834 |
//! |
|
1835 |
//! @SYMTestType CIT |
|
1836 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1837 |
CREATE_OBJECT RFs RFs1 |
|
1838 |
CREATE_OBJECT RFile file |
|
1839 |
COMMAND RFs1 new |
|
1840 |
COMMAND RFs1 Connect |
|
1841 |
COMMAND file new |
|
1842 |
COMMAND !Error=-12 file Open PBASE-F32-File-PublicApi-0101-001-Open_command005 |
|
1843 |
COMMAND file ~ |
|
1844 |
COMMAND RFs1 ~ |
|
1845 |
END_TEST_BLOCK |
|
1846 |
END_TESTCASE PBASE-F32-File-PublicApi-0101 |
|
1847 |
||
1848 |
||
1849 |
||
1850 |
||
1851 |
START_TESTCASE PBASE-F32-File-PublicApi-0103 |
|
1852 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0103 |
|
1853 |
//! @SYMAPI RFile |
|
1854 |
//! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid filemodes. |
|
1855 |
//! Uses API elements: Open(). |
|
1856 |
//! @SYMTestActions 1. Create RFs session. |
|
1857 |
//! 2. Create file "{Drives, RAMDriveTestPath}file\tc0103.txt". |
|
1858 |
//! 3. Close file. |
|
1859 |
//! 4. Open file "{Drives, RAMDriveTestPath}file\tc0103.txt" with EFileShareReadersOnly | EFileWrite. |
|
1860 |
//! 5. Delete file. |
|
1861 |
//! 6. Close fs. |
|
1862 |
//! |
|
1863 |
//! @SYMTestStatus Implemented |
|
1864 |
//! @SYMTestPriority Critical |
|
1865 |
//! @SYMTestExpectedResults Open returns KErrArgument on step 2. |
|
1866 |
//! |
|
1867 |
//! @SYMTestType CIT |
|
1868 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1869 |
CREATE_OBJECT RFs RFs1 |
|
1870 |
CREATE_OBJECT RFile file |
|
1871 |
COMMAND RFs1 new |
|
1872 |
COMMAND RFs1 Connect |
|
1873 |
COMMAND file new |
|
1874 |
COMMAND file Replace PBASE-F32-File-PublicApi-0103-001-Replace_command005 |
|
1875 |
COMMAND file Close |
|
1876 |
COMMAND !Error=-6 file Open PBASE-F32-File-PublicApi-0103-001-Open_command007 |
|
1877 |
COMMAND file ~ |
|
1878 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0103-001-Delete_command010 |
|
1879 |
COMMAND RFs1 ~ |
|
1880 |
END_TEST_BLOCK |
|
1881 |
END_TESTCASE PBASE-F32-File-PublicApi-0103 |
|
1882 |
||
1883 |
||
1884 |
// |
|
1885 |
// Create |
|
1886 |
// |
|
1887 |
||
1888 |
||
1889 |
START_TESTCASE PBASE-F32-File-PublicApi-0201 |
|
1890 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0201 |
|
1891 |
//! @SYMAPI RFile |
|
1892 |
//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file in nonexistant folder. |
|
1893 |
//! Uses API elements: Create(). |
|
1894 |
//! @SYMTestActions 1. Create RFs session |
|
1895 |
//! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileShareAny |
|
1896 |
//! 3. Close RFs. |
|
1897 |
//! |
|
1898 |
//! @SYMTestStatus Implemented |
|
1899 |
//! @SYMTestPriority Critical |
|
1900 |
//! @SYMTestExpectedResults RFile::Create() returns KErrPathNotFound on step 2. |
|
1901 |
//! |
|
1902 |
//! @SYMTestType CIT |
|
1903 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1904 |
CREATE_OBJECT RFs RFs1 |
|
1905 |
CREATE_OBJECT RFile file |
|
1906 |
COMMAND RFs1 new |
|
1907 |
COMMAND RFs1 Connect |
|
1908 |
COMMAND file new |
|
1909 |
COMMAND !Error=-12 file Create PBASE-F32-File-PublicApi-0201-001-Create_command005 |
|
1910 |
COMMAND file ~ |
|
1911 |
COMMAND RFs1 ~ |
|
1912 |
END_TEST_BLOCK |
|
1913 |
END_TESTCASE PBASE-F32-File-PublicApi-0201 |
|
1914 |
||
1915 |
||
1916 |
START_TESTCASE PBASE-F32-File-PublicApi-0202 |
|
1917 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0202 |
|
1918 |
//! @SYMAPI RFile |
|
1919 |
//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file which already exists. |
|
1920 |
//! Uses API elements: Create(). |
|
1921 |
//! @SYMTestActions 1. Create RFs handle. |
|
1922 |
//! 2. Create a File, by calling RFile::Replace with "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite. |
|
1923 |
//! 3. Close file. |
|
1924 |
//! 4. Call RFile::Create passing "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite. |
|
1925 |
//! 5. Delete file. |
|
1926 |
//! 6. Close fs. |
|
1927 |
//! |
|
1928 |
//! @SYMTestStatus Implemented |
|
1929 |
//! @SYMTestPriority Critical |
|
1930 |
//! @SYMTestExpectedResults KErrAlreadyExists on step 3 |
|
1931 |
//! |
|
1932 |
//! @SYMTestType CIT |
|
1933 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1934 |
CREATE_OBJECT RFs RFs1 |
|
1935 |
CREATE_OBJECT RFile file |
|
1936 |
COMMAND RFs1 new |
|
1937 |
COMMAND RFs1 Connect |
|
1938 |
COMMAND file new |
|
1939 |
COMMAND file Replace PBASE-F32-File-PublicApi-0202-001-Replace_command005 |
|
1940 |
COMMAND file Close |
|
1941 |
COMMAND !Error=-11 file Create PBASE-F32-File-PublicApi-0202-001-Create_command007 |
|
1942 |
COMMAND file ~ |
|
1943 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0202-001-Delete_command010 |
|
1944 |
COMMAND RFs1 ~ |
|
1945 |
END_TEST_BLOCK |
|
1946 |
END_TESTCASE PBASE-F32-File-PublicApi-0202 |
|
1947 |
||
1948 |
||
1949 |
START_TESTCASE PBASE-F32-File-PublicApi-0203 |
|
1950 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0203 |
|
1951 |
//! @SYMAPI RFile |
|
1952 |
//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file with bizarre filemodes. |
|
1953 |
//! Uses API elements: Create(). |
|
1954 |
//! @SYMTestActions 1. Create RFs session |
|
1955 |
//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0203.txt" |
|
1956 |
//! 3. Delete file "{Drives, RAMDriveTestPath}file\tc0203.txt" |
|
1957 |
//! 2. Create file "{Drives, RAMDriveTestPath}file\tc0203.txt" with EFileShareReadersOnly | EFileWrite |
|
1958 |
//! 3. Close session. |
|
1959 |
//! |
|
1960 |
//! @SYMTestStatus Implemented |
|
1961 |
//! @SYMTestPriority Critical |
|
1962 |
//! @SYMTestExpectedResults Create returns KErrArgument on step 2. |
|
1963 |
//! |
|
1964 |
//! @SYMTestType CIT |
|
1965 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
1966 |
CREATE_OBJECT RFs RFs1 |
|
1967 |
CREATE_OBJECT RFile file |
|
1968 |
COMMAND RFs1 new |
|
1969 |
COMMAND RFs1 Connect |
|
1970 |
COMMAND file new |
|
1971 |
COMMAND file Replace PBASE-F32-File-PublicApi-0203-001-Replace_command001 |
|
1972 |
COMMAND file Close |
|
1973 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0203-001-Delete_command002 |
|
1974 |
COMMAND !Error=-6 file Create PBASE-F32-File-PublicApi-0203-001-Create_command005 |
|
1975 |
COMMAND file ~ |
|
1976 |
COMMAND RFs1 ~ |
|
1977 |
END_TEST_BLOCK |
|
1978 |
END_TESTCASE PBASE-F32-File-PublicApi-0203 |
|
1979 |
||
1980 |
||
1981 |
// |
|
1982 |
// Replace |
|
1983 |
// |
|
1984 |
||
1985 |
||
1986 |
START_TESTCASE PBASE-F32-File-PublicApi-0301 |
|
1987 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0301 |
|
1988 |
//! @SYMAPI RFile |
|
1989 |
//! @SYMTestCaseDesc Function Replace() neg. test. Replace a file with nonexistant path. |
|
1990 |
//! Uses API elements: Replace(). |
|
1991 |
//! @SYMTestActions 1. Create RFs session |
|
1992 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileWrite |
|
1993 |
//! 3. Close RFs. |
|
1994 |
//! |
|
1995 |
//! @SYMTestStatus Implemented |
|
1996 |
//! @SYMTestPriority Critical |
|
1997 |
//! @SYMTestExpectedResults RFile::Replace() returns KErrPathNotFound on step 2. |
|
1998 |
//! |
|
1999 |
//! @SYMTestType CIT |
|
2000 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2001 |
CREATE_OBJECT RFs RFs1 |
|
2002 |
CREATE_OBJECT RFile file |
|
2003 |
COMMAND RFs1 new |
|
2004 |
COMMAND RFs1 Connect |
|
2005 |
COMMAND file new |
|
2006 |
COMMAND !Error=-12 file Replace PBASE-F32-File-PublicApi-0301-001-Replace_command005 |
|
2007 |
COMMAND file ~ |
|
2008 |
COMMAND RFs1 ~ |
|
2009 |
END_TEST_BLOCK |
|
2010 |
END_TESTCASE PBASE-F32-File-PublicApi-0301 |
|
2011 |
||
2012 |
||
2013 |
START_TESTCASE PBASE-F32-File-PublicApi-0303 |
|
2014 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0303 |
|
2015 |
//! @SYMAPI RFile |
|
2016 |
//! @SYMTestCaseDesc Function Replace() neg. test. Call Replace with bizarre filemodes. |
|
2017 |
//! Uses API elements: Replace(). |
|
2018 |
//! @SYMTestActions 1. Create RFs session |
|
2019 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0303.txt", EFileShareReadersOnly | EFileWrite |
|
2020 |
//! 3. Close RFs. |
|
2021 |
//! |
|
2022 |
//! @SYMTestStatus Implemented |
|
2023 |
//! @SYMTestPriority Critical |
|
2024 |
//! @SYMTestExpectedResults returns KErrArgument on step 2. |
|
2025 |
//! |
|
2026 |
//! @SYMTestType CIT |
|
2027 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2028 |
CREATE_OBJECT RFs RFs1 |
|
2029 |
CREATE_OBJECT RFile file |
|
2030 |
COMMAND RFs1 new |
|
2031 |
COMMAND RFs1 Connect |
|
2032 |
COMMAND file new |
|
2033 |
COMMAND !Error=-6 file Replace PBASE-F32-File-PublicApi-0303-001-Replace_command005 |
|
2034 |
COMMAND file ~ |
|
2035 |
COMMAND RFs1 ~ |
|
2036 |
END_TEST_BLOCK |
|
2037 |
END_TESTCASE PBASE-F32-File-PublicApi-0303 |
|
2038 |
||
2039 |
// |
|
2040 |
// TEMP |
|
2041 |
// |
|
2042 |
||
2043 |
START_TESTCASE PBASE-F32-File-PublicApi-0401 |
|
2044 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0401 |
|
2045 |
//! @SYMAPI RFile |
|
2046 |
//! @SYMTestCaseDesc Function Temp() neg. test. Try to create temporary file in nonexistant directory. |
|
2047 |
//! Uses API elements: Temp(). |
|
2048 |
//! @SYMTestActions 1. Create RFs session |
|
2049 |
//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveChar}:\base\chickenfarm\", TDesc&, EFileWrite |
|
2050 |
//! 3. Close RFs. |
|
2051 |
//! |
|
2052 |
//! @SYMTestStatus Implemented |
|
2053 |
//! @SYMTestPriority Critical |
|
2054 |
//! @SYMTestExpectedResults RFile::Temp() KErrPathNotFound on step 2. |
|
2055 |
//! |
|
2056 |
//! @SYMTestType CIT |
|
2057 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2058 |
CREATE_OBJECT RFs RFs1 |
|
2059 |
CREATE_OBJECT RFile file |
|
2060 |
COMMAND RFs1 new |
|
2061 |
COMMAND RFs1 Connect |
|
2062 |
COMMAND file new |
|
2063 |
COMMAND !Error=-12 file Temp PBASE-F32-File-PublicApi-0401-001-Temp_command005 |
|
2064 |
COMMAND file ~ |
|
2065 |
COMMAND RFs1 ~ |
|
2066 |
END_TEST_BLOCK |
|
2067 |
END_TESTCASE PBASE-F32-File-PublicApi-0401 |
|
2068 |
||
2069 |
||
2070 |
START_TESTCASE PBASE-F32-File-PublicApi-0403 |
|
2071 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0403 |
|
2072 |
//! @SYMAPI RFile |
|
2073 |
//! @SYMTestCaseDesc Function Temp() neg. test. Try to create a temporary file with obscure filemodes. |
|
2074 |
//! Uses API elements: Temp(). |
|
2075 |
//! @SYMTestActions 1. Create RFs session |
|
2076 |
//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileShareReadersOnly | EFileWrite |
|
2077 |
//! 3. Close RFs. |
|
2078 |
//! |
|
2079 |
//! @SYMTestStatus Implemented |
|
2080 |
//! @SYMTestPriority Critical |
|
2081 |
//! @SYMTestExpectedResults RFile::Temp() returns KErrArgument on step 2. |
|
2082 |
//! |
|
2083 |
//! @SYMTestType CIT |
|
2084 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2085 |
CREATE_OBJECT RFs RFs1 |
|
2086 |
CREATE_OBJECT RFile file |
|
2087 |
COMMAND RFs1 new |
|
2088 |
COMMAND RFs1 Connect |
|
2089 |
COMMAND file new |
|
2090 |
COMMAND !Error=-6 file Temp PBASE-F32-File-PublicApi-0403-001-Temp_command005 |
|
2091 |
COMMAND file ~ |
|
2092 |
COMMAND RFs1 ~ |
|
2093 |
END_TEST_BLOCK |
|
2094 |
END_TESTCASE PBASE-F32-File-PublicApi-0403 |
|
2095 |
||
2096 |
||
2097 |
// |
|
2098 |
// READ3 |
|
2099 |
// |
|
2100 |
||
2101 |
||
2102 |
START_TESTCASE PBASE-F32-File-PublicApi-0701 |
|
2103 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0701 |
|
2104 |
//! @SYMAPI RFile |
|
2105 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read negative length. |
|
2106 |
//! Uses API elements: Read(). |
|
2107 |
//! @SYMTestActions 1. Create RFs session |
|
2108 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\0701.txt", EFileWrite |
|
2109 |
//! 3. Write "test" to file |
|
2110 |
//! 4. Reset file position. |
|
2111 |
//! 5. Call RFile::Read() passing TDesC, -1 for the length |
|
2112 |
//! 6. Close RFile. |
|
2113 |
//! 7. Delete file. |
|
2114 |
//! 8. Close RFs. |
|
2115 |
//! |
|
2116 |
//! @SYMTestStatus Implemented |
|
2117 |
//! @SYMTestPriority Critical |
|
2118 |
//! @SYMTestExpectedResults RFile::Read() returns KErrArgument. |
|
2119 |
//! |
|
2120 |
//! @SYMTestType CIT |
|
2121 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2122 |
CREATE_OBJECT RFs RFs1 |
|
2123 |
CREATE_OBJECT RFile file |
|
2124 |
COMMAND RFs1 new |
|
2125 |
COMMAND RFs1 Connect |
|
2126 |
COMMAND file new |
|
2127 |
COMMAND file Replace PBASE-F32-File-PublicApi-0701-001-Replace_command005 |
|
2128 |
COMMAND file Write PBASE-F32-File-PublicApi-0701-001-Write_command006 |
|
2129 |
COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-0701-001-Read_command007 |
|
2130 |
COMMAND file Close |
|
2131 |
COMMAND file ~ |
|
2132 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0701-001-Delete_command011 |
|
2133 |
COMMAND RFs1 ~ |
|
2134 |
END_TEST_BLOCK |
|
2135 |
END_TESTCASE PBASE-F32-File-PublicApi-0701 |
|
2136 |
||
2137 |
||
2138 |
START_TESTCASE PBASE-F32-File-PublicApi-0702 |
|
2139 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0702 |
|
2140 |
//! @SYMAPI RFile |
|
2141 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length. |
|
2142 |
//! Uses API elements: Read(). |
|
2143 |
//! @SYMTestActions 1. Create RFs session |
|
2144 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0702.txt", EFileWrite |
|
2145 |
//! 3. Write "readtest" to file |
|
2146 |
//! 4. Reset file position. |
|
2147 |
//! 5. Create buffer descriptor with length 4. |
|
2148 |
//! 5. Call RFile::Read() passing buffer, 1000 for the length. |
|
2149 |
//! 6. Close RFile. |
|
2150 |
//! 7. Delete file. |
|
2151 |
//! 8. Close RFs. |
|
2152 |
//! |
|
2153 |
//! @SYMTestStatus Implemented |
|
2154 |
//! @SYMTestPriority Critical |
|
2155 |
//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. |
|
2156 |
//! |
|
2157 |
//! @SYMTestType CIT |
|
2158 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2159 |
CREATE_OBJECT RFs RFs1 |
|
2160 |
CREATE_OBJECT RFile file |
|
2161 |
COMMAND RFs1 new |
|
2162 |
COMMAND RFs1 Connect |
|
2163 |
COMMAND file new |
|
2164 |
COMMAND file Replace PBASE-F32-File-PublicApi-0702-001-Replace_command005 |
|
2165 |
COMMAND file Write PBASE-F32-File-PublicApi-0702-001-Write_command006 |
|
2166 |
COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-0702-001-Read_command007 |
|
2167 |
COMMAND file Close |
|
2168 |
COMMAND file ~ |
|
2169 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0702-001-Delete_command011 |
|
2170 |
COMMAND RFs1 ~ |
|
2171 |
END_TEST_BLOCK |
|
2172 |
END_TESTCASE PBASE-F32-File-PublicApi-0702 |
|
2173 |
||
2174 |
||
2175 |
START_TESTCASE PBASE-F32-File-PublicApi-0703 |
|
2176 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0703 |
|
2177 |
//! @SYMAPI RFile |
|
2178 |
//! @SYMTestCaseDesc Synchronous Read(TDesC8& aData, TInt length) test. Pass 0 for length |
|
2179 |
//! Uses API elements: Read(). |
|
2180 |
//! @SYMTestActions 1. Create RFs session |
|
2181 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0703.txt", EFileWrite |
|
2182 |
//! 3. Write "readtest" to file |
|
2183 |
//! 4. Reset file position. |
|
2184 |
//! 5. Create buffer descriptor with length 4. |
|
2185 |
//! 5. Call RFile::Read() passing buffer, 0 for the length. |
|
2186 |
//! 6. Close RFile. |
|
2187 |
//! 7. Close RFs. |
|
2188 |
//! |
|
2189 |
//! @SYMTestStatus Implemented |
|
2190 |
//! @SYMTestPriority Critical |
|
2191 |
//! @SYMTestExpectedResults RFile::Read() returns empty descriptor |
|
2192 |
//! |
|
2193 |
//! @SYMTestType CIT |
|
2194 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2195 |
CREATE_OBJECT RFs RFs1 |
|
2196 |
CREATE_OBJECT RFile file |
|
2197 |
COMMAND RFs1 new |
|
2198 |
COMMAND RFs1 Connect |
|
2199 |
COMMAND file new |
|
2200 |
COMMAND file Replace PBASE-F32-File-PublicApi-0703-001-Replace_command005 |
|
2201 |
COMMAND file Write PBASE-F32-File-PublicApi-0703-001-Write_command006 |
|
2202 |
COMMAND file Read PBASE-F32-File-PublicApi-0703-001-Read_command007 |
|
2203 |
COMMAND file Close |
|
2204 |
COMMAND file ~ |
|
2205 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0703-001-Delete_command011 |
|
2206 |
COMMAND RFs1 ~ |
|
2207 |
END_TEST_BLOCK |
|
2208 |
END_TESTCASE PBASE-F32-File-PublicApi-0703 |
|
2209 |
||
2210 |
||
2211 |
// |
|
2212 |
// READ4 |
|
2213 |
// |
|
2214 |
||
2215 |
||
2216 |
START_TESTCASE PBASE-F32-File-PublicApi-0801 |
|
2217 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0801 |
|
2218 |
//! @SYMAPI RFile |
|
2219 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read negative length. |
|
2220 |
//! Uses API elements: Read(). |
|
2221 |
//! @SYMTestActions 1. Create RFs session |
|
2222 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0801.txt", EFileWrite |
|
2223 |
//! 3. Write "test" to file |
|
2224 |
//! 4. Reset file position. |
|
2225 |
//! 5. Call RFile::Read() passing TDesC, -1 for the length, TRequestStatus |
|
2226 |
//! 6. wait for request. |
|
2227 |
//! 7. Close RFile. |
|
2228 |
//! 8. Delete file. |
|
2229 |
//! 9. Close RFs. |
|
2230 |
//! |
|
2231 |
//! @SYMTestStatus Implemented |
|
2232 |
//! @SYMTestPriority Critical |
|
2233 |
//! @SYMTestExpectedResults RFile::Read() returns KErrArgument with TRequestStatus. |
|
2234 |
//! |
|
2235 |
//! @SYMTestType CIT |
|
2236 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2237 |
CREATE_OBJECT RFs RFs1 |
|
2238 |
CREATE_OBJECT RFile file |
|
2239 |
COMMAND RFs1 new |
|
2240 |
COMMAND RFs1 Connect |
|
2241 |
COMMAND file new |
|
2242 |
COMMAND file Replace PBASE-F32-File-PublicApi-0801-001-Replace_command005 |
|
2243 |
COMMAND file Write PBASE-F32-File-PublicApi-0801-001-Write_command006 |
|
2244 |
COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-0801-001-Read_command007 |
|
2245 |
OUTSTANDING |
|
2246 |
COMMAND file Close |
|
2247 |
COMMAND file ~ |
|
2248 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0801-001-Delete_command011 |
|
2249 |
COMMAND RFs1 ~ |
|
2250 |
END_TEST_BLOCK |
|
2251 |
END_TESTCASE PBASE-F32-File-PublicApi-0801 |
|
2252 |
||
2253 |
||
2254 |
START_TESTCASE PBASE-F32-File-PublicApi-0802 |
|
2255 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0802 |
|
2256 |
//! @SYMAPI RFile |
|
2257 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length. |
|
2258 |
//! Uses API elements: Read(). |
|
2259 |
//! @SYMTestActions 1. Create RFs session |
|
2260 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0802.txt", EFileWrite |
|
2261 |
//! 3. Write "readtest" to file |
|
2262 |
//! 4. Reset file position. |
|
2263 |
//! 5. Create buffer descriptor with length 4. |
|
2264 |
//! 6. Call RFile::Read() passing buffer, 1000 for the length, TRequestStatus |
|
2265 |
//! 7. Wait for status. |
|
2266 |
//! 8. Close RFile. |
|
2267 |
//! 9. Delete file. |
|
2268 |
//! 10. Close RFs. |
|
2269 |
//! |
|
2270 |
//! @SYMTestStatus Implemented |
|
2271 |
//! @SYMTestPriority Critical |
|
2272 |
//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow, with TRequestStatus. |
|
2273 |
//! |
|
2274 |
//! @SYMTestType CIT |
|
2275 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2276 |
CREATE_OBJECT RFs RFs1 |
|
2277 |
CREATE_OBJECT RFile file |
|
2278 |
COMMAND RFs1 new |
|
2279 |
COMMAND RFs1 Connect |
|
2280 |
COMMAND file new |
|
2281 |
COMMAND file Replace PBASE-F32-File-PublicApi-0802-001-Replace_command005 |
|
2282 |
COMMAND file Write PBASE-F32-File-PublicApi-0802-001-Write_command006 |
|
2283 |
COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-0802-001-Read_command007 |
|
2284 |
OUTSTANDING |
|
2285 |
COMMAND file Close |
|
2286 |
COMMAND file ~ |
|
2287 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0802-001-Delete_command011 |
|
2288 |
COMMAND RFs1 ~ |
|
2289 |
END_TEST_BLOCK |
|
2290 |
END_TESTCASE PBASE-F32-File-PublicApi-0802 |
|
2291 |
||
2292 |
||
2293 |
// |
|
2294 |
// READ5 |
|
2295 |
// |
|
2296 |
||
2297 |
||
2298 |
START_TESTCASE PBASE-F32-File-PublicApi-0901 |
|
2299 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0901 |
|
2300 |
//! @SYMAPI RFile |
|
2301 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read from negative position. |
|
2302 |
//! Uses API elements: Read(). |
|
2303 |
//! @SYMTestActions 1. Create RFs session |
|
2304 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0901.txt", EFileWrite |
|
2305 |
//! 3. Write "test" to file |
|
2306 |
//! 4. Reset file position. |
|
2307 |
//! 5. Call RFile::Read() passing -1 for position. |
|
2308 |
//! 6. Close file. |
|
2309 |
//! 7. Delete file. |
|
2310 |
//! 8. Close file server session. |
|
2311 |
//! |
|
2312 |
//! @SYMTestStatus Implemented |
|
2313 |
//! @SYMTestPriority Critical |
|
2314 |
//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. |
|
2315 |
//! |
|
2316 |
//! @SYMTestType CIT |
|
2317 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2318 |
CREATE_OBJECT RFs RFs1 |
|
2319 |
CREATE_OBJECT RFile file |
|
2320 |
COMMAND RFs1 new |
|
2321 |
COMMAND RFs1 Connect |
|
2322 |
COMMAND file new |
|
2323 |
COMMAND file Replace PBASE-F32-File-PublicApi-0901-001-Replace_command005 |
|
2324 |
COMMAND file Write PBASE-F32-File-PublicApi-0901-001-Write_command006 |
|
2325 |
COMMAND file Read PBASE-F32-File-PublicApi-0901-001-Read_command007 |
|
2326 |
COMMAND file Close |
|
2327 |
COMMAND file ~ |
|
2328 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011 |
|
2329 |
COMMAND RFs1 ~ |
|
2330 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
2331 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2332 |
CREATE_OBJECT RFs RFs1 |
|
2333 |
COMMAND RFs1 new |
|
2334 |
COMMAND RFs1 Connect |
|
2335 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011 |
|
2336 |
COMMAND RFs1 ~ |
|
2337 |
END_TEST_BLOCK |
|
2338 |
END_TESTCASE PBASE-F32-File-PublicApi-0901 |
|
2339 |
||
2340 |
||
2341 |
START_TESTCASE PBASE-F32-File-PublicApi-0902 |
|
2342 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-0902 |
|
2343 |
//! @SYMAPI RFile |
|
2344 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read beyond file's length. |
|
2345 |
//! Uses API elements: Read(). |
|
2346 |
//! @SYMTestActions 1. Create RFs session |
|
2347 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0902.txt", EFileWrite |
|
2348 |
//! 3. Write "test" to file |
|
2349 |
//! 4. Reset file position. |
|
2350 |
//! 5. Call RFile::Read() passing 100 for position. |
|
2351 |
//! 6. Close file. |
|
2352 |
//! 7. Delete file. |
|
2353 |
//! 8. Close file server session. |
|
2354 |
//! |
|
2355 |
//! @SYMTestStatus Implemented |
|
2356 |
//! @SYMTestPriority Critical |
|
2357 |
//! @SYMTestExpectedResults RFile::Read(data, position) returns zero length descriptor. |
|
2358 |
//! |
|
2359 |
//! @SYMTestType CIT |
|
2360 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2361 |
CREATE_OBJECT RFs RFs1 |
|
2362 |
CREATE_OBJECT RFile file |
|
2363 |
COMMAND RFs1 new |
|
2364 |
COMMAND RFs1 Connect |
|
2365 |
COMMAND file new |
|
2366 |
COMMAND file Replace PBASE-F32-File-PublicApi-0902-001-Replace_command005 |
|
2367 |
COMMAND file Write PBASE-F32-File-PublicApi-0902-001-Write_command006 |
|
2368 |
COMMAND file Read PBASE-F32-File-PublicApi-0902-001-Read_command007 |
|
2369 |
COMMAND file Close |
|
2370 |
COMMAND file ~ |
|
2371 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0902-001-Delete_command011 |
|
2372 |
COMMAND RFs1 ~ |
|
2373 |
END_TEST_BLOCK |
|
2374 |
END_TESTCASE PBASE-F32-File-PublicApi-0902 |
|
2375 |
||
2376 |
||
2377 |
// |
|
2378 |
// READ6 |
|
2379 |
// |
|
2380 |
||
2381 |
||
2382 |
START_TESTCASE PBASE-F32-File-PublicApi-1001 |
|
2383 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1001 |
|
2384 |
//! @SYMAPI RFile |
|
2385 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read from negative position. |
|
2386 |
//! Uses API elements: Read(). |
|
2387 |
//! @SYMTestActions 1. Create RFs session |
|
2388 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1001.txt", EFileWrite |
|
2389 |
//! 3. Write "synchronous read with position test" to file |
|
2390 |
//! 4. Call RFile::Read() passing -1 for position, TRequestStatus. |
|
2391 |
//! 5. close file. |
|
2392 |
//! 6. Delete tc1001.txt |
|
2393 |
//! 7. Close file server session. |
|
2394 |
//! |
|
2395 |
//! @SYMTestStatus Implemented |
|
2396 |
//! @SYMTestPriority Critical |
|
2397 |
//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. |
|
2398 |
//! |
|
2399 |
//! @SYMTestType CIT |
|
2400 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2401 |
CREATE_OBJECT RFs RFs1 |
|
2402 |
CREATE_OBJECT RFile file |
|
2403 |
COMMAND RFs1 new |
|
2404 |
COMMAND RFs1 Connect |
|
2405 |
COMMAND file new |
|
2406 |
COMMAND file Replace PBASE-F32-File-PublicApi-1001-001-Replace_command005 |
|
2407 |
COMMAND file Write PBASE-F32-File-PublicApi-1001-001-Write_command006 |
|
2408 |
COMMAND file Read PBASE-F32-File-PublicApi-1001-001-Read_command007 |
|
2409 |
OUTSTANDING |
|
2410 |
COMMAND file Close |
|
2411 |
COMMAND file ~ |
|
2412 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011 |
|
2413 |
COMMAND RFs1 ~ |
|
2414 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
2415 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2416 |
CREATE_OBJECT RFs RFs1 |
|
2417 |
COMMAND RFs1 new |
|
2418 |
COMMAND RFs1 Connect |
|
2419 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011 |
|
2420 |
COMMAND RFs1 ~ |
|
2421 |
END_TEST_BLOCK |
|
2422 |
END_TESTCASE PBASE-F32-File-PublicApi-1001 |
|
2423 |
||
2424 |
||
2425 |
START_TESTCASE PBASE-F32-File-PublicApi-1002 |
|
2426 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1002 |
|
2427 |
//! @SYMAPI RFile |
|
2428 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read beyond files length. |
|
2429 |
//! Uses API elements: Read(). |
|
2430 |
//! @SYMTestActions 1. Create RFs session |
|
2431 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1002.txt", EFileWrite |
|
2432 |
//! 3. Write "test" to file |
|
2433 |
//! 4. Reset file position. |
|
2434 |
//! 5. Call RFile::Read() passing 100 for position, TRequestStatus. |
|
2435 |
//! 6. close file. |
|
2436 |
//! 7. Delete tc1002.txt |
|
2437 |
//! 8. Close file server session. |
|
2438 |
//! |
|
2439 |
//! @SYMTestStatus Implemented |
|
2440 |
//! @SYMTestPriority Critical |
|
2441 |
//! @SYMTestExpectedResults RFile::Read(data, position, status) returns zero length descriptor. |
|
2442 |
//! |
|
2443 |
//! @SYMTestType CIT |
|
2444 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2445 |
CREATE_OBJECT RFs RFs1 |
|
2446 |
CREATE_OBJECT RFile file |
|
2447 |
COMMAND RFs1 new |
|
2448 |
COMMAND RFs1 Connect |
|
2449 |
COMMAND file new |
|
2450 |
COMMAND file Replace PBASE-F32-File-PublicApi-1002-001-Replace_command005 |
|
2451 |
COMMAND file Write PBASE-F32-File-PublicApi-1002-001-Write_command006 |
|
2452 |
COMMAND file Read PBASE-F32-File-PublicApi-1002-001-Read_command007 |
|
2453 |
OUTSTANDING |
|
2454 |
COMMAND file Close |
|
2455 |
COMMAND file ~ |
|
2456 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1002-001-Delete_command011 |
|
2457 |
COMMAND RFs1 ~ |
|
2458 |
END_TEST_BLOCK |
|
2459 |
END_TESTCASE PBASE-F32-File-PublicApi-1002 |
|
2460 |
||
2461 |
// |
|
2462 |
// READ7 |
|
2463 |
// |
|
2464 |
||
2465 |
||
2466 |
START_TESTCASE PBASE-F32-File-PublicApi-1101 |
|
2467 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1101 |
|
2468 |
//! @SYMAPI RFile |
|
2469 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from negative position. |
|
2470 |
//! Uses API elements: Read(). |
|
2471 |
//! @SYMTestActions 1. Create RFs session |
|
2472 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1101.txt", EFileWrite |
|
2473 |
//! 3. Write "test" to file |
|
2474 |
//! 4. Reset file position. |
|
2475 |
//! 5. Call RFile::Read() passing 4 for length and -1 for position. |
|
2476 |
//! |
|
2477 |
//! @SYMTestStatus Implemented |
|
2478 |
//! @SYMTestPriority Critical |
|
2479 |
//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. |
|
2480 |
//! |
|
2481 |
//! @SYMTestType CIT |
|
2482 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2483 |
CREATE_OBJECT RFs RFs1 |
|
2484 |
CREATE_OBJECT RFile file |
|
2485 |
COMMAND RFs1 new |
|
2486 |
COMMAND RFs1 Connect |
|
2487 |
COMMAND file new |
|
2488 |
COMMAND file Replace PBASE-F32-File-PublicApi-1101-001-Replace_command005 |
|
2489 |
COMMAND file Write PBASE-F32-File-PublicApi-1101-001-Write_command006 |
|
2490 |
COMMAND file Read PBASE-F32-File-PublicApi-1101-001-Read_command007 |
|
2491 |
COMMAND file Close |
|
2492 |
COMMAND file ~ |
|
2493 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011 |
|
2494 |
COMMAND RFs1 ~ |
|
2495 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
2496 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2497 |
CREATE_OBJECT RFs RFs1 |
|
2498 |
COMMAND RFs1 new |
|
2499 |
COMMAND RFs1 Connect |
|
2500 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011 |
|
2501 |
COMMAND RFs1 ~ |
|
2502 |
END_TEST_BLOCK |
|
2503 |
END_TESTCASE PBASE-F32-File-PublicApi-1101 |
|
2504 |
||
2505 |
||
2506 |
START_TESTCASE PBASE-F32-File-PublicApi-1102 |
|
2507 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1102 |
|
2508 |
//! @SYMAPI RFile |
|
2509 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - will try to read negative length. |
|
2510 |
//! Uses API elements: Read(). |
|
2511 |
//! @SYMTestActions 1. Create RFs session |
|
2512 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1102.txt", EFileWrite |
|
2513 |
//! 3. Write "test" to file |
|
2514 |
//! 4. Reset file position. |
|
2515 |
//! 5. Call RFile::Read() passing -4 for length and 10 for position. |
|
2516 |
//! 6. Close RFile. |
|
2517 |
//! 7. Delete file. |
|
2518 |
//! 8. Close RFs. |
|
2519 |
//! |
|
2520 |
//! @SYMTestStatus Implemented |
|
2521 |
//! @SYMTestPriority Critical |
|
2522 |
//! @SYMTestExpectedResults RFile::Read() returns KErrArgument. |
|
2523 |
//! |
|
2524 |
//! @SYMTestType CIT |
|
2525 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2526 |
CREATE_OBJECT RFs RFs1 |
|
2527 |
CREATE_OBJECT RFile file |
|
2528 |
COMMAND RFs1 new |
|
2529 |
COMMAND RFs1 Connect |
|
2530 |
COMMAND file new |
|
2531 |
COMMAND file Replace PBASE-F32-File-PublicApi-1102-001-Replace_command005 |
|
2532 |
COMMAND file Write PBASE-F32-File-PublicApi-1102-001-Write_command006 |
|
2533 |
COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-1102-001-Read_command007 |
|
2534 |
COMMAND file Close |
|
2535 |
COMMAND file ~ |
|
2536 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1102-001-Delete_command011 |
|
2537 |
COMMAND RFs1 ~ |
|
2538 |
END_TEST_BLOCK |
|
2539 |
END_TESTCASE PBASE-F32-File-PublicApi-1102 |
|
2540 |
||
2541 |
||
2542 |
START_TESTCASE PBASE-F32-File-PublicApi-1103 |
|
2543 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1103 |
|
2544 |
//! @SYMAPI RFile |
|
2545 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from position beyond file length. |
|
2546 |
//! Uses API elements: Read(). |
|
2547 |
//! @SYMTestActions 1. Create RFs session |
|
2548 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1103.txt", EFileWrite |
|
2549 |
//! 3. Write "test" to file |
|
2550 |
//! 4. Reset file position. |
|
2551 |
//! 5. Call RFile::Read() passing 4 for length and 10 for position (larger than file's content). |
|
2552 |
//! 6. Close RFile. |
|
2553 |
//! 7. Delete file. |
|
2554 |
//! 8. Close RFs. |
|
2555 |
//! |
|
2556 |
//! @SYMTestStatus Implemented |
|
2557 |
//! @SYMTestPriority Critical |
|
2558 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0. |
|
2559 |
//! |
|
2560 |
//! @SYMTestType CIT |
|
2561 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2562 |
CREATE_OBJECT RFs RFs1 |
|
2563 |
CREATE_OBJECT RFile file |
|
2564 |
COMMAND RFs1 new |
|
2565 |
COMMAND RFs1 Connect |
|
2566 |
COMMAND file new |
|
2567 |
COMMAND file Replace PBASE-F32-File-PublicApi-1103-001-Replace_command005 |
|
2568 |
COMMAND file Write PBASE-F32-File-PublicApi-1103-001-Write_command006 |
|
2569 |
COMMAND file Read PBASE-F32-File-PublicApi-1103-001-Read_command007 |
|
2570 |
COMMAND file Close |
|
2571 |
COMMAND file ~ |
|
2572 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1103-001-Delete_command011 |
|
2573 |
COMMAND RFs1 ~ |
|
2574 |
END_TEST_BLOCK |
|
2575 |
END_TESTCASE PBASE-F32-File-PublicApi-1103 |
|
2576 |
||
2577 |
||
2578 |
START_TESTCASE PBASE-F32-File-PublicApi-1104 |
|
2579 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1104 |
|
2580 |
//! @SYMAPI RFile |
|
2581 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length. |
|
2582 |
//! Uses API elements: Read(). |
|
2583 |
//! @SYMTestActions 1. Create RFs session |
|
2584 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1104.txt", EFileRead |
|
2585 |
//! 3. Write "readtest" to file |
|
2586 |
//! 4. Reset file position. |
|
2587 |
//! 5. Call RFile::Read() passing buffer (with size 4) 1000 for length and 10 for position. |
|
2588 |
//! 6. Close RFile. |
|
2589 |
//! 7. Delete file. |
|
2590 |
//! 8. Close RFs. |
|
2591 |
//! |
|
2592 |
//! @SYMTestStatus Implemented |
|
2593 |
//! @SYMTestPriority Critical |
|
2594 |
//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. |
|
2595 |
//! |
|
2596 |
//! @SYMTestType CIT |
|
2597 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2598 |
CREATE_OBJECT RFs RFs1 |
|
2599 |
CREATE_OBJECT RFile file |
|
2600 |
COMMAND RFs1 new |
|
2601 |
COMMAND RFs1 Connect |
|
2602 |
COMMAND file new |
|
2603 |
COMMAND file Replace PBASE-F32-File-PublicApi-1104-001-Replace_command005 |
|
2604 |
COMMAND file Write PBASE-F32-File-PublicApi-1104-001-Write_command006 |
|
2605 |
COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-1104-001-Read_command007 |
|
2606 |
COMMAND file Close |
|
2607 |
COMMAND file ~ |
|
2608 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1104-001-Delete_command011 |
|
2609 |
COMMAND RFs1 ~ |
|
2610 |
END_TEST_BLOCK |
|
2611 |
END_TESTCASE PBASE-F32-File-PublicApi-1104 |
|
2612 |
||
2613 |
||
2614 |
// |
|
2615 |
// READ8 |
|
2616 |
// |
|
2617 |
||
2618 |
||
2619 |
START_TESTCASE PBASE-F32-File-PublicApi-1201 |
|
2620 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1201 |
|
2621 |
//! @SYMAPI RFile |
|
2622 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from negative position. |
|
2623 |
//! Uses API elements: Read(). |
|
2624 |
//! @SYMTestActions 1. Create RFs session |
|
2625 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1201.txt", EFileWrite |
|
2626 |
//! 3. Write "test" to file |
|
2627 |
//! 4. Reset file position. |
|
2628 |
//! 5. Call RFile::Read() passing 4 for length and -1 for position and TRequestStatus. |
|
2629 |
//! |
|
2630 |
//! @SYMTestStatus Implemented |
|
2631 |
//! @SYMTestPriority Critical |
|
2632 |
//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. |
|
2633 |
//! |
|
2634 |
//! @SYMTestType CIT |
|
2635 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2636 |
CREATE_OBJECT RFs RFs1 |
|
2637 |
CREATE_OBJECT RFile file |
|
2638 |
COMMAND RFs1 new |
|
2639 |
COMMAND RFs1 Connect |
|
2640 |
COMMAND file new |
|
2641 |
COMMAND file Replace PBASE-F32-File-PublicApi-1201-001-Replace_command005 |
|
2642 |
COMMAND file Write PBASE-F32-File-PublicApi-1201-001-Write_command006 |
|
2643 |
COMMAND file Read PBASE-F32-File-PublicApi-1201-001-Read_command007 |
|
2644 |
OUTSTANDING |
|
2645 |
COMMAND file Close |
|
2646 |
COMMAND file ~ |
|
2647 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011 |
|
2648 |
COMMAND RFs1 ~ |
|
2649 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
2650 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2651 |
CREATE_OBJECT RFs RFs1 |
|
2652 |
COMMAND RFs1 new |
|
2653 |
COMMAND RFs1 Connect |
|
2654 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011 |
|
2655 |
COMMAND RFs1 ~ |
|
2656 |
END_TEST_BLOCK |
|
2657 |
END_TESTCASE PBASE-F32-File-PublicApi-1201 |
|
2658 |
||
2659 |
||
2660 |
START_TESTCASE PBASE-F32-File-PublicApi-1202 |
|
2661 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1202 |
|
2662 |
//! @SYMAPI RFile |
|
2663 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - will try to read negative length. |
|
2664 |
//! Uses API elements: Read(). |
|
2665 |
//! @SYMTestActions 1. Create RFs session |
|
2666 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1202.txt", EFileWrite |
|
2667 |
//! 3. Write "test" to file |
|
2668 |
//! 4. Reset file position. |
|
2669 |
//! 5. Call RFile::Read() passing -4 for length and 10 for position and TRequestStatus. |
|
2670 |
//! 6. wait for request to complete |
|
2671 |
//! 7. Close RFile. |
|
2672 |
//! 8. Delete file. |
|
2673 |
//! 9. Close RFs. |
|
2674 |
//! |
|
2675 |
//! @SYMTestStatus Implemented |
|
2676 |
//! @SYMTestPriority Critical |
|
2677 |
//! @SYMTestExpectedResults RFile::Read() returns KErrArgument. |
|
2678 |
//! |
|
2679 |
//! @SYMTestType CIT |
|
2680 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2681 |
CREATE_OBJECT RFs RFs1 |
|
2682 |
CREATE_OBJECT RFile file |
|
2683 |
COMMAND RFs1 new |
|
2684 |
COMMAND RFs1 Connect |
|
2685 |
COMMAND file new |
|
2686 |
COMMAND file Replace PBASE-F32-File-PublicApi-1202-001-Replace_command005 |
|
2687 |
COMMAND file Write PBASE-F32-File-PublicApi-1202-001-Write_command006 |
|
2688 |
COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-1202-001-Read_command007 |
|
2689 |
OUTSTANDING |
|
2690 |
COMMAND file Close |
|
2691 |
COMMAND file ~ |
|
2692 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1202-001-Delete_command011 |
|
2693 |
COMMAND RFs1 ~ |
|
2694 |
END_TEST_BLOCK |
|
2695 |
END_TESTCASE PBASE-F32-File-PublicApi-1202 |
|
2696 |
||
2697 |
||
2698 |
START_TESTCASE PBASE-F32-File-PublicApi-1203 |
|
2699 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1203 |
|
2700 |
//! @SYMAPI RFile |
|
2701 |
//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from position beyond file length. |
|
2702 |
//! Uses API elements: Read(). |
|
2703 |
//! @SYMTestActions 1. Create RFs session |
|
2704 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1203.txt", EFileWrite |
|
2705 |
//! 3. Write "test" to file |
|
2706 |
//! 4. Reset file position. |
|
2707 |
//! 5. Call RFile::Read(), 4 for length, 10 for position. |
|
2708 |
//! 6. Wait for request to complete. |
|
2709 |
//! 7. Close RFile. |
|
2710 |
//! 8. Delete file. |
|
2711 |
//! 9. Close RFs. |
|
2712 |
//! |
|
2713 |
//! @SYMTestStatus Implemented |
|
2714 |
//! @SYMTestPriority Critical |
|
2715 |
//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0. |
|
2716 |
//! |
|
2717 |
//! @SYMTestType CIT |
|
2718 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2719 |
CREATE_OBJECT RFs RFs1 |
|
2720 |
CREATE_OBJECT RFile file |
|
2721 |
COMMAND RFs1 new |
|
2722 |
COMMAND RFs1 Connect |
|
2723 |
COMMAND file new |
|
2724 |
COMMAND file Replace PBASE-F32-File-PublicApi-1203-001-Replace_command005 |
|
2725 |
COMMAND file Write PBASE-F32-File-PublicApi-1203-001-Write_command006 |
|
2726 |
COMMAND file Read PBASE-F32-File-PublicApi-1203-001-Read_command007 |
|
2727 |
OUTSTANDING |
|
2728 |
COMMAND file Close |
|
2729 |
COMMAND file ~ |
|
2730 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1203-001-Delete_command011 |
|
2731 |
COMMAND RFs1 ~ |
|
2732 |
END_TEST_BLOCK |
|
2733 |
END_TESTCASE PBASE-F32-File-PublicApi-1203 |
|
2734 |
||
2735 |
||
2736 |
START_TESTCASE PBASE-F32-File-PublicApi-1204 |
|
2737 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1204 |
|
2738 |
//! @SYMAPI RFile |
|
2739 |
//! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length. |
|
2740 |
//! Uses API elements: Read(). |
|
2741 |
//! @SYMTestActions 1. Create RFs session |
|
2742 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1204.txt", EFileWrite |
|
2743 |
//! 3. Write "synchronous read with length and position test" to file |
|
2744 |
//! 4. Reset file position. |
|
2745 |
//! 5. Call RFile::Read() passing buffer (buffer size 4) 1000 for length and for position 10, TRequestStatus. |
|
2746 |
//! 6. Wait for request. |
|
2747 |
//! 7. Close RFile. |
|
2748 |
//! 8. Delete file. |
|
2749 |
//! 9. Close RFs. |
|
2750 |
//! |
|
2751 |
//! @SYMTestStatus Implemented |
|
2752 |
//! @SYMTestPriority Critical |
|
2753 |
//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. |
|
2754 |
//! |
|
2755 |
//! @SYMTestType CIT |
|
2756 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2757 |
CREATE_OBJECT RFs RFs1 |
|
2758 |
CREATE_OBJECT RFile file |
|
2759 |
COMMAND RFs1 new |
|
2760 |
COMMAND RFs1 Connect |
|
2761 |
COMMAND file new |
|
2762 |
COMMAND file Replace PBASE-F32-File-PublicApi-1204-001-Replace_command005 |
|
2763 |
COMMAND file Write PBASE-F32-File-PublicApi-1204-001-Write_command006 |
|
2764 |
COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-1204-001-Read_command007 |
|
2765 |
OUTSTANDING |
|
2766 |
COMMAND file Close |
|
2767 |
COMMAND file ~ |
|
2768 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1204-001-Delete_command011 |
|
2769 |
COMMAND RFs1 ~ |
|
2770 |
END_TEST_BLOCK |
|
2771 |
END_TESTCASE PBASE-F32-File-PublicApi-1204 |
|
2772 |
||
2773 |
// |
|
2774 |
// Write |
|
2775 |
// |
|
2776 |
||
2777 |
START_TESTCASE PBASE-F32-File-PublicApi-1301 |
|
2778 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1301 |
|
2779 |
//! @SYMAPI RFile |
|
2780 |
//! @SYMTestCaseDesc Function Write(const TDesC8 &aDes) test - write an emptry buffer to file. |
|
2781 |
//! |
|
2782 |
//! @SYMTestActions 1. Create RFs session. |
|
2783 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1301.txt", EFileWrite. |
|
2784 |
//! 3. Call Write, passing "" and descriptor with length 0. |
|
2785 |
//! 4. Close file |
|
2786 |
//! 5. Close RFile. |
|
2787 |
//! 6. Delete file |
|
2788 |
//! 7. Close RFs. |
|
2789 |
//! |
|
2790 |
//! @SYMTestStatus Implemented |
|
2791 |
//! @SYMTestPriority Critical |
|
2792 |
//! @SYMTestExpectedResults No panic is raised, or error returned. |
|
2793 |
//! |
|
2794 |
//! @SYMTestType CIT |
|
2795 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2796 |
CREATE_OBJECT RFs RFs1 |
|
2797 |
CREATE_OBJECT RFile file |
|
2798 |
COMMAND RFs1 new |
|
2799 |
COMMAND RFs1 Connect |
|
2800 |
COMMAND file new |
|
2801 |
COMMAND file Replace PBASE-F32-File-PublicApi-1301-001-Replace_command005 |
|
2802 |
COMMAND file Write PBASE-F32-File-PublicApi-1301-001-Write_command006 |
|
2803 |
COMMAND file Close |
|
2804 |
COMMAND file ~ |
|
2805 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1301-001-Delete_command010 |
|
2806 |
COMMAND RFs1 ~ |
|
2807 |
END_TEST_BLOCK |
|
2808 |
END_TESTCASE PBASE-F32-File-PublicApi-1301 |
|
2809 |
||
2810 |
// |
|
2811 |
// Write2 |
|
2812 |
// |
|
2813 |
||
2814 |
START_TESTCASE PBASE-F32-File-PublicApi-1401 |
|
2815 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1401 |
|
2816 |
//! @SYMAPI RFile |
|
2817 |
//! @SYMTestCaseDesc Function WWrite(const TDesC8 &aDes, TRequestStatus &aStatus) test - write an emptry buffer to file. |
|
2818 |
//! |
|
2819 |
//! @SYMTestActions 1. Create RFs session. |
|
2820 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc.txt", EFileWrite. |
|
2821 |
//! 3. Call Write, passing "" and descriptor with length 0. |
|
2822 |
//! 4. Close file |
|
2823 |
//! 5. Close RFile. |
|
2824 |
//! 6. Delete file |
|
2825 |
//! 7. Close RFs. |
|
2826 |
//! |
|
2827 |
//! @SYMTestStatus Implemented |
|
2828 |
//! @SYMTestPriority Critical |
|
2829 |
//! @SYMTestExpectedResults No panic is raised, or error returned. |
|
2830 |
//! |
|
2831 |
//! @SYMTestType CIT |
|
2832 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2833 |
CREATE_OBJECT RFs RFs1 |
|
2834 |
CREATE_OBJECT RFile file |
|
2835 |
COMMAND RFs1 new |
|
2836 |
COMMAND RFs1 Connect |
|
2837 |
COMMAND file new |
|
2838 |
COMMAND file Replace PBASE-F32-File-PublicApi-1401-001-Replace_command005 |
|
2839 |
COMMAND file Write PBASE-F32-File-PublicApi-1401-001-Write_command006 |
|
2840 |
OUTSTANDING |
|
2841 |
COMMAND file Close |
|
2842 |
COMMAND file ~ |
|
2843 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1401-001-Delete_command010 |
|
2844 |
COMMAND RFs1 ~ |
|
2845 |
END_TEST_BLOCK |
|
2846 |
END_TESTCASE PBASE-F32-File-PublicApi-1401 |
|
2847 |
||
2848 |
||
2849 |
// |
|
2850 |
// Write3 |
|
2851 |
// |
|
2852 |
||
2853 |
||
2854 |
START_TESTCASE PBASE-F32-File-PublicApi-1602 |
|
2855 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1602 |
|
2856 |
//! @SYMAPI RFile |
|
2857 |
//! @SYMTestCaseDesc Function write neg. test - pass negative number for length. |
|
2858 |
//! |
|
2859 |
//! @SYMTestActions 1. Create RFs session. |
|
2860 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1602.txt", EFileWrite. |
|
2861 |
//! 3. Call Write, pass message "short data" and -1 length. |
|
2862 |
//! 4. Close file |
|
2863 |
//! 5. Close RFile. |
|
2864 |
//! 6. Delete file |
|
2865 |
//! 7. Close RFs. |
|
2866 |
//! |
|
2867 |
//! @SYMTestStatus Implemented |
|
2868 |
//! @SYMTestPriority Critical |
|
2869 |
//! @SYMTestExpectedResults Write() returns KErrArgument. |
|
2870 |
//! |
|
2871 |
//! @SYMTestType CIT |
|
2872 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2873 |
CREATE_OBJECT RFs RFs1 |
|
2874 |
CREATE_OBJECT RFile file |
|
2875 |
COMMAND RFs1 new |
|
2876 |
COMMAND RFs1 Connect |
|
2877 |
COMMAND file new |
|
2878 |
COMMAND file Replace PBASE-F32-File-PublicApi-1602-001-Replace_command005 |
|
2879 |
COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-1602-001-Write_command006 |
|
2880 |
COMMAND file Close |
|
2881 |
COMMAND file ~ |
|
2882 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1602-001-Delete_command010 |
|
2883 |
COMMAND RFs1 ~ |
|
2884 |
END_TEST_BLOCK |
|
2885 |
END_TESTCASE PBASE-F32-File-PublicApi-1602 |
|
2886 |
||
2887 |
||
2888 |
START_TESTCASE PBASE-F32-File-PublicApi-1603 |
|
2889 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1603 |
|
2890 |
//! @SYMAPI RFile |
|
2891 |
//! @SYMTestCaseDesc Function write neg. test - pass 0 number for length. |
|
2892 |
//! |
|
2893 |
//! @SYMTestActions 1. Create RFs session. |
|
2894 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1603.txt", EFileWrite. |
|
2895 |
//! 3. Call Write, pass message "short data" and 0. |
|
2896 |
//! 4. Close file |
|
2897 |
//! 5. Close RFile. |
|
2898 |
//! 6. Delete file. |
|
2899 |
//! 7. Close RFs. |
|
2900 |
//! |
|
2901 |
//! @SYMTestStatus Implemented |
|
2902 |
//! @SYMTestPriority Critical |
|
2903 |
//! @SYMTestExpectedResults Write() returns KErrNone. |
|
2904 |
//! |
|
2905 |
//! @SYMTestType CIT |
|
2906 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2907 |
CREATE_OBJECT RFs RFs1 |
|
2908 |
CREATE_OBJECT RFile file |
|
2909 |
COMMAND RFs1 new |
|
2910 |
COMMAND RFs1 Connect |
|
2911 |
COMMAND file new |
|
2912 |
COMMAND file Replace PBASE-F32-File-PublicApi-1603-001-Replace_command005 |
|
2913 |
COMMAND file Write PBASE-F32-File-PublicApi-1603-001-Write_command006 |
|
2914 |
COMMAND file Close |
|
2915 |
COMMAND file ~ |
|
2916 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1603-001-Delete_command010 |
|
2917 |
COMMAND RFs1 ~ |
|
2918 |
END_TEST_BLOCK |
|
2919 |
END_TESTCASE PBASE-F32-File-PublicApi-1603 |
|
2920 |
||
2921 |
||
2922 |
// |
|
2923 |
// Write4 |
|
2924 |
// |
|
2925 |
||
2926 |
START_TESTCASE PBASE-F32-File-PublicApi-1701 |
|
2927 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1701 |
|
2928 |
//! @SYMAPI RFile |
|
2929 |
//! @SYMTestCaseDesc Asynchronous function write neg. test - pass negative number for length. |
|
2930 |
//! |
|
2931 |
//! @SYMTestActions 1. Create RFs session. |
|
2932 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1701.txt", EFileWrite. |
|
2933 |
//! 3. Call Write passing literal "test", -1 for length and TRequestStatus. |
|
2934 |
//! 4. Close RFile. |
|
2935 |
//! 5. Delete file. |
|
2936 |
//! 6. Close RFs. |
|
2937 |
//! |
|
2938 |
//! @SYMTestStatus Implemented |
|
2939 |
//! @SYMTestPriority Critical |
|
2940 |
//! @SYMTestExpectedResults Write() returns KErrArgument. |
|
2941 |
//! |
|
2942 |
//! @SYMTestType CIT |
|
2943 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2944 |
CREATE_OBJECT RFs RFs1 |
|
2945 |
CREATE_OBJECT RFile file |
|
2946 |
COMMAND RFs1 new |
|
2947 |
COMMAND RFs1 Connect |
|
2948 |
COMMAND file new |
|
2949 |
COMMAND file Replace PBASE-F32-File-PublicApi-1701-001-Replace_command005 |
|
2950 |
COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-1701-001-Write_command006 |
|
2951 |
OUTSTANDING |
|
2952 |
COMMAND file Close |
|
2953 |
COMMAND file ~ |
|
2954 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1701-001-Delete_command010 |
|
2955 |
COMMAND RFs1 ~ |
|
2956 |
END_TEST_BLOCK |
|
2957 |
END_TESTCASE PBASE-F32-File-PublicApi-1701 |
|
2958 |
||
2959 |
START_TESTCASE PBASE-F32-File-PublicApi-1702 |
|
2960 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1702 |
|
2961 |
//! @SYMAPI RFile |
|
2962 |
//! @SYMTestCaseDesc Asynchronous function write test - pass 0 for length. |
|
2963 |
//! |
|
2964 |
//! @SYMTestActions 1. Create RFs session. |
|
2965 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1702.txt", EFileWrite. |
|
2966 |
//! 3. Call Write passing literal "test", 0 for length and TRequestStatus. |
|
2967 |
//! 4. Close RFile. |
|
2968 |
//! 5. Delete file. |
|
2969 |
//! 6. Close RFs. |
|
2970 |
//! |
|
2971 |
//! @SYMTestStatus Implemented |
|
2972 |
//! @SYMTestPriority Critical |
|
2973 |
//! @SYMTestExpectedResults No panics raised or errors returned. |
|
2974 |
//! |
|
2975 |
//! @SYMTestType CIT |
|
2976 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
2977 |
CREATE_OBJECT RFs RFs1 |
|
2978 |
CREATE_OBJECT RFile file |
|
2979 |
COMMAND RFs1 new |
|
2980 |
COMMAND RFs1 Connect |
|
2981 |
COMMAND file new |
|
2982 |
COMMAND file Replace PBASE-F32-File-PublicApi-1702-001-Replace_command005 |
|
2983 |
COMMAND file Write PBASE-F32-File-PublicApi-1702-001-Write_command006 |
|
2984 |
OUTSTANDING |
|
2985 |
COMMAND file Close |
|
2986 |
COMMAND file ~ |
|
2987 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1702-001-Delete_command010 |
|
2988 |
COMMAND RFs1 ~ |
|
2989 |
END_TEST_BLOCK |
|
2990 |
END_TESTCASE PBASE-F32-File-PublicApi-1702 |
|
2991 |
||
2992 |
||
2993 |
// |
|
2994 |
// Write5 |
|
2995 |
// |
|
2996 |
||
2997 |
||
2998 |
START_TESTCASE PBASE-F32-File-PublicApi-1801 |
|
2999 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1801 |
|
3000 |
//! @SYMAPI RFile |
|
3001 |
//! @SYMTestCaseDesc Function write neg. test. Write to negative position. |
|
3002 |
//! Uses API elements:. |
|
3003 |
//! @SYMTestActions 1. Create RFs session. |
|
3004 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1801.txt", EFileWrite. |
|
3005 |
//! 3. Call Write passing "test" and -1 for position. |
|
3006 |
//! |
|
3007 |
//! |
|
3008 |
//! @SYMTestStatus Implemented |
|
3009 |
//! @SYMTestPriority Critical |
|
3010 |
//! @SYMTestExpectedResults Panic FSCLIENT:19. |
|
3011 |
//! |
|
3012 |
//! @SYMTestType CIT |
|
3013 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3014 |
CREATE_OBJECT RFs RFs1 |
|
3015 |
CREATE_OBJECT RFile file |
|
3016 |
COMMAND RFs1 new |
|
3017 |
COMMAND RFs1 Connect |
|
3018 |
COMMAND file new |
|
3019 |
COMMAND file Replace PBASE-F32-File-PublicApi-1801-001-Replace_command005 |
|
3020 |
COMMAND file Write PBASE-F32-File-PublicApi-1801-001-Write_command006 |
|
3021 |
COMMAND file Close |
|
3022 |
COMMAND file ~ |
|
3023 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010 |
|
3024 |
COMMAND RFs1 ~ |
|
3025 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3026 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3027 |
CREATE_OBJECT RFs RFs1 |
|
3028 |
COMMAND RFs1 new |
|
3029 |
COMMAND RFs1 Connect |
|
3030 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010 |
|
3031 |
COMMAND RFs1 ~ |
|
3032 |
END_TEST_BLOCK |
|
3033 |
END_TESTCASE PBASE-F32-File-PublicApi-1801 |
|
3034 |
||
3035 |
||
3036 |
START_TESTCASE PBASE-F32-File-PublicApi-1802 |
|
3037 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1802 |
|
3038 |
//! @SYMAPI RFile |
|
3039 |
//! @SYMTestCaseDesc Synchronous function write test. Pass a 0 length descriptor to RFile::Write(). |
|
3040 |
//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). |
|
3041 |
//! @SYMTestActions 1. Create RFs session. |
|
3042 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1802.txt", EFileWrite. |
|
3043 |
//! 3. Call Write passing "" and 1 for position. |
|
3044 |
//! |
|
3045 |
//! |
|
3046 |
//! @SYMTestStatus Implemented |
|
3047 |
//! @SYMTestPriority Critical |
|
3048 |
//! @SYMTestExpectedResults No error is returned or panic raised. |
|
3049 |
//! |
|
3050 |
//! @SYMTestType CIT |
|
3051 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3052 |
CREATE_OBJECT RFs RFs1 |
|
3053 |
CREATE_OBJECT RFile file |
|
3054 |
COMMAND RFs1 new |
|
3055 |
COMMAND RFs1 Connect |
|
3056 |
COMMAND file new |
|
3057 |
COMMAND file Replace PBASE-F32-File-PublicApi-1802-001-Replace_command005 |
|
3058 |
COMMAND file Write PBASE-F32-File-PublicApi-1802-001-Write_command006 |
|
3059 |
COMMAND file Close |
|
3060 |
COMMAND file ~ |
|
3061 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1802-001-Delete_command010 |
|
3062 |
COMMAND RFs1 ~ |
|
3063 |
END_TEST_BLOCK |
|
3064 |
END_TESTCASE PBASE-F32-File-PublicApi-1802 |
|
3065 |
||
3066 |
||
3067 |
// |
|
3068 |
// Write6 |
|
3069 |
// |
|
3070 |
||
3071 |
||
3072 |
START_TESTCASE PBASE-F32-File-PublicApi-1901 |
|
3073 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1901 |
|
3074 |
//! @SYMAPI RFile |
|
3075 |
//! @SYMTestCaseDesc Asynchronous function write neg. test. Pass a negative number for position to RFile::Write(). |
|
3076 |
//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). |
|
3077 |
//! @SYMTestActions 1. Create RFs session. |
|
3078 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1901.txt", EFileWrite. |
|
3079 |
//! 3. Call Write passing "test" and -1 for position. |
|
3080 |
//! |
|
3081 |
//! |
|
3082 |
//! @SYMTestStatus Implemented |
|
3083 |
//! @SYMTestPriority Critical |
|
3084 |
//! @SYMTestExpectedResults Panic FSCLIENT:19. |
|
3085 |
//! |
|
3086 |
//! @SYMTestType CIT |
|
3087 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3088 |
CREATE_OBJECT RFs RFs1 |
|
3089 |
CREATE_OBJECT RFile file |
|
3090 |
COMMAND RFs1 new |
|
3091 |
COMMAND RFs1 Connect |
|
3092 |
COMMAND file new |
|
3093 |
COMMAND file Replace PBASE-F32-File-PublicApi-1901-001-Replace_command005 |
|
3094 |
COMMAND file Write PBASE-F32-File-PublicApi-1901-001-Write_command006 |
|
3095 |
OUTSTANDING |
|
3096 |
COMMAND file Close |
|
3097 |
COMMAND file ~ |
|
3098 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010 |
|
3099 |
COMMAND RFs1 ~ |
|
3100 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3101 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3102 |
CREATE_OBJECT RFs RFs1 |
|
3103 |
COMMAND RFs1 new |
|
3104 |
COMMAND RFs1 Connect |
|
3105 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010 |
|
3106 |
COMMAND RFs1 ~ |
|
3107 |
END_TEST_BLOCK |
|
3108 |
END_TESTCASE PBASE-F32-File-PublicApi-1901 |
|
3109 |
||
3110 |
||
3111 |
START_TESTCASE PBASE-F32-File-PublicApi-1902 |
|
3112 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-1902 |
|
3113 |
//! @SYMAPI RFile |
|
3114 |
//! @SYMTestCaseDesc Asynchronous function write test. Pass a 0 length descriptor to RFile::Write(). |
|
3115 |
//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). |
|
3116 |
//! @SYMTestActions 1. Create RFs session. |
|
3117 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1902.txt", EFileWrite. |
|
3118 |
//! 3. Call Write passing descriptor with length 0 and 1 for position. |
|
3119 |
//! |
|
3120 |
//! |
|
3121 |
//! @SYMTestStatus Implemented |
|
3122 |
//! @SYMTestPriority Critical |
|
3123 |
//! @SYMTestExpectedResults No error is returned or panic raised. |
|
3124 |
//! |
|
3125 |
//! @SYMTestType CIT |
|
3126 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3127 |
CREATE_OBJECT RFs RFs1 |
|
3128 |
CREATE_OBJECT RFile file |
|
3129 |
COMMAND RFs1 new |
|
3130 |
COMMAND RFs1 Connect |
|
3131 |
COMMAND file new |
|
3132 |
COMMAND file Replace PBASE-F32-File-PublicApi-1902-001-Replace_command005 |
|
3133 |
COMMAND file Write PBASE-F32-File-PublicApi-1902-001-Write_command006 |
|
3134 |
OUTSTANDING |
|
3135 |
COMMAND file Close |
|
3136 |
COMMAND file ~ |
|
3137 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1902-001-Delete_command010 |
|
3138 |
COMMAND RFs1 ~ |
|
3139 |
END_TEST_BLOCK |
|
3140 |
END_TESTCASE PBASE-F32-File-PublicApi-1902 |
|
3141 |
||
3142 |
||
3143 |
// |
|
3144 |
// Write7 |
|
3145 |
// |
|
3146 |
||
3147 |
||
3148 |
START_TESTCASE PBASE-F32-File-PublicApi-2001 |
|
3149 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2001 |
|
3150 |
//! @SYMAPI RFile |
|
3151 |
//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) neg. test. Pass a negative position and negative length. |
|
3152 |
//! Uses API elements: Write(). |
|
3153 |
//! @SYMTestActions 1. Create RFs session. |
|
3154 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2001.txt", EFileWrite. |
|
3155 |
//! 3. call write, pass "test", -1 for length, -1 for position. |
|
3156 |
//! |
|
3157 |
//! |
|
3158 |
//! @SYMTestStatus Implemented |
|
3159 |
//! @SYMTestPriority Critical |
|
3160 |
//! @SYMTestExpectedResults Panic, FSCLIENT:19 |
|
3161 |
//! |
|
3162 |
//! @SYMTestType CIT |
|
3163 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3164 |
CREATE_OBJECT RFs RFs1 |
|
3165 |
CREATE_OBJECT RFile file |
|
3166 |
COMMAND RFs1 new |
|
3167 |
COMMAND RFs1 Connect |
|
3168 |
COMMAND file new |
|
3169 |
COMMAND file Replace PBASE-F32-File-PublicApi-2001-001-Replace_command005 |
|
3170 |
COMMAND file Write PBASE-F32-File-PublicApi-2001-001-Write_command006 |
|
3171 |
COMMAND file Close |
|
3172 |
COMMAND file ~ |
|
3173 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010 |
|
3174 |
COMMAND RFs1 ~ |
|
3175 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3176 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3177 |
CREATE_OBJECT RFs RFs1 |
|
3178 |
COMMAND RFs1 new |
|
3179 |
COMMAND RFs1 Connect |
|
3180 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010 |
|
3181 |
COMMAND RFs1 ~ |
|
3182 |
END_TEST_BLOCK |
|
3183 |
END_TESTCASE PBASE-F32-File-PublicApi-2001 |
|
3184 |
||
3185 |
||
3186 |
START_TESTCASE PBASE-F32-File-PublicApi-2002 |
|
3187 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2002 |
|
3188 |
//! @SYMAPI RFile |
|
3189 |
//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length. |
|
3190 |
//! Uses API elements: Write(). |
|
3191 |
//! @SYMTestActions 1. Create RFs session. |
|
3192 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2002.txt", EFileWrite. |
|
3193 |
//! 3. call write, pass "test", 0 for length, 0 for position. |
|
3194 |
//! |
|
3195 |
//! |
|
3196 |
//! @SYMTestStatus Implemented |
|
3197 |
//! @SYMTestPriority Critical |
|
3198 |
//! @SYMTestExpectedResults No panic is raised and no error is returned |
|
3199 |
//! |
|
3200 |
//! @SYMTestType CIT |
|
3201 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3202 |
CREATE_OBJECT RFs RFs1 |
|
3203 |
CREATE_OBJECT RFile file |
|
3204 |
COMMAND RFs1 new |
|
3205 |
COMMAND RFs1 Connect |
|
3206 |
COMMAND file new |
|
3207 |
COMMAND file Replace PBASE-F32-File-PublicApi-2002-001-Replace_command005 |
|
3208 |
COMMAND file Write PBASE-F32-File-PublicApi-2002-001-Write_command006 |
|
3209 |
COMMAND file Close |
|
3210 |
COMMAND file ~ |
|
3211 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2002-001-Delete_command010 |
|
3212 |
COMMAND RFs1 ~ |
|
3213 |
END_TEST_BLOCK |
|
3214 |
END_TESTCASE PBASE-F32-File-PublicApi-2002 |
|
3215 |
||
3216 |
||
3217 |
START_TESTCASE PBASE-F32-File-PublicApi-2003 |
|
3218 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2003 |
|
3219 |
//! @SYMAPI RFile |
|
3220 |
//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass -1 for length. |
|
3221 |
//! Uses API elements: Write(). |
|
3222 |
//! @SYMTestActions 1. Create RFs session. |
|
3223 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2003.txt", EFileWrite. |
|
3224 |
//! 3. call write, pass "test", -1 for length, 0 for position. |
|
3225 |
//! |
|
3226 |
//! |
|
3227 |
//! @SYMTestStatus Implemented |
|
3228 |
//! @SYMTestPriority Critical |
|
3229 |
//! @SYMTestExpectedResults RFile::Write returns KerrArgument |
|
3230 |
//! |
|
3231 |
//! @SYMTestType CIT |
|
3232 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3233 |
CREATE_OBJECT RFs RFs1 |
|
3234 |
CREATE_OBJECT RFile file |
|
3235 |
COMMAND RFs1 new |
|
3236 |
COMMAND RFs1 Connect |
|
3237 |
COMMAND file new |
|
3238 |
COMMAND file Replace PBASE-F32-File-PublicApi-2003-001-Replace_command005 |
|
3239 |
COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-2003-001-Write_command006 |
|
3240 |
COMMAND file Close |
|
3241 |
COMMAND file ~ |
|
3242 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2003-001-Delete_command010 |
|
3243 |
COMMAND RFs1 ~ |
|
3244 |
END_TEST_BLOCK |
|
3245 |
END_TESTCASE PBASE-F32-File-PublicApi-2003 |
|
3246 |
||
3247 |
||
3248 |
// |
|
3249 |
// Write8 |
|
3250 |
// |
|
3251 |
||
3252 |
||
3253 |
START_TESTCASE PBASE-F32-File-PublicApi-2101 |
|
3254 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2101 |
|
3255 |
//! @SYMAPI RFile |
|
3256 |
//! @SYMTestCaseDesc Asynchronous function write test. Pass a negative position and negative length. |
|
3257 |
//! Uses API elements: Write(). |
|
3258 |
//! @SYMTestActions 1. Create RFs session. |
|
3259 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2101.txt", EFileWrite. |
|
3260 |
//! 3. call write, pass literal "negative write test", -1 for length, -1 for negative, TRequestStatus. |
|
3261 |
//! |
|
3262 |
//! |
|
3263 |
//! @SYMTestStatus Implemented |
|
3264 |
//! @SYMTestPriority Critical |
|
3265 |
//! @SYMTestExpectedResults Panic, FSCLIENT:19 |
|
3266 |
//! |
|
3267 |
//! @SYMTestType CIT |
|
3268 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3269 |
CREATE_OBJECT RFs RFs1 |
|
3270 |
CREATE_OBJECT RFile file |
|
3271 |
COMMAND RFs1 new |
|
3272 |
COMMAND RFs1 Connect |
|
3273 |
COMMAND file new |
|
3274 |
COMMAND file Replace PBASE-F32-File-PublicApi-2101-001-Replace_command005 |
|
3275 |
COMMAND file Write PBASE-F32-File-PublicApi-2101-001-Write_command006 |
|
3276 |
OUTSTANDING |
|
3277 |
COMMAND file Close |
|
3278 |
COMMAND file ~ |
|
3279 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010 |
|
3280 |
COMMAND RFs1 ~ |
|
3281 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3282 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3283 |
CREATE_OBJECT RFs RFs1 |
|
3284 |
COMMAND RFs1 new |
|
3285 |
COMMAND RFs1 Connect |
|
3286 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010 |
|
3287 |
COMMAND RFs1 ~ |
|
3288 |
END_TEST_BLOCK |
|
3289 |
END_TESTCASE PBASE-F32-File-PublicApi-2101 |
|
3290 |
||
3291 |
||
3292 |
START_TESTCASE PBASE-F32-File-PublicApi-2102 |
|
3293 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2102 |
|
3294 |
//! @SYMAPI RFile |
|
3295 |
//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length. |
|
3296 |
//! Uses API elements: Write(). |
|
3297 |
//! @SYMTestActions 1. Create RFs session. |
|
3298 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2102.txt", EFileWrite. |
|
3299 |
//! 3. call write, pass "test", 0 for length, 0 for position. |
|
3300 |
//! |
|
3301 |
//! |
|
3302 |
//! @SYMTestStatus Implemented |
|
3303 |
//! @SYMTestPriority Critical |
|
3304 |
//! @SYMTestExpectedResults No panic is raised and no error is returned |
|
3305 |
//! |
|
3306 |
//! @SYMTestType CIT |
|
3307 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3308 |
CREATE_OBJECT RFs RFs1 |
|
3309 |
CREATE_OBJECT RFile file |
|
3310 |
COMMAND RFs1 new |
|
3311 |
COMMAND RFs1 Connect |
|
3312 |
COMMAND file new |
|
3313 |
COMMAND file Replace PBASE-F32-File-PublicApi-2102-001-Replace_command005 |
|
3314 |
COMMAND file Write PBASE-F32-File-PublicApi-2102-001-Write_command006 |
|
3315 |
OUTSTANDING |
|
3316 |
COMMAND file Close |
|
3317 |
COMMAND file ~ |
|
3318 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2102-001-Delete_command010 |
|
3319 |
COMMAND RFs1 ~ |
|
3320 |
END_TEST_BLOCK |
|
3321 |
END_TESTCASE PBASE-F32-File-PublicApi-2102 |
|
3322 |
||
3323 |
||
3324 |
START_TESTCASE PBASE-F32-File-PublicApi-2103 |
|
3325 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2103 |
|
3326 |
//! @SYMAPI RFile |
|
3327 |
//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass a negative length. |
|
3328 |
//! Uses API elements: Write(). |
|
3329 |
//! @SYMTestActions 1. Create RFs session. |
|
3330 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2103.txt", EFileWrite. |
|
3331 |
//! 3. call write, pass "test", -1 for length, 0 for position. |
|
3332 |
//! |
|
3333 |
//! |
|
3334 |
//! @SYMTestStatus Implemented |
|
3335 |
//! @SYMTestPriority Critical |
|
3336 |
//! @SYMTestExpectedResults RFile::Write returns KerrArgument |
|
3337 |
//! |
|
3338 |
//! @SYMTestType CIT |
|
3339 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3340 |
CREATE_OBJECT RFs RFs1 |
|
3341 |
CREATE_OBJECT RFile file |
|
3342 |
COMMAND RFs1 new |
|
3343 |
COMMAND RFs1 Connect |
|
3344 |
COMMAND file new |
|
3345 |
COMMAND file Replace PBASE-F32-File-PublicApi-2103-001-Replace_command005 |
|
3346 |
COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-2103-001-Write_command006 |
|
3347 |
OUTSTANDING |
|
3348 |
COMMAND file Close |
|
3349 |
COMMAND file ~ |
|
3350 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2103-001-Delete_command010 |
|
3351 |
COMMAND RFs1 ~ |
|
3352 |
END_TEST_BLOCK |
|
3353 |
END_TESTCASE PBASE-F32-File-PublicApi-2103 |
|
3354 |
||
3355 |
||
3356 |
// |
|
3357 |
// Lock |
|
3358 |
// |
|
3359 |
||
3360 |
||
3361 |
START_TESTCASE PBASE-F32-File-PublicApi-2201 |
|
3362 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2201 |
|
3363 |
//! @SYMAPI RFile |
|
3364 |
//! @SYMTestCaseDesc Function Lock() neg. test - open a file and try to lock zero bytes. |
|
3365 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
3366 |
//! @SYMTestActions 1. Create RFs session |
|
3367 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2201.txt", EFileRead. |
|
3368 |
//! 3. Write "test" to file. |
|
3369 |
//! 4. Lock the file by Calling Lock(), passing pos 0, len 0. |
|
3370 |
//! 5. Close file. |
|
3371 |
//! 6. Close fs session. |
|
3372 |
//! |
|
3373 |
//! |
|
3374 |
//! @SYMTestStatus Implemented |
|
3375 |
//! @SYMTestPriority Critical |
|
3376 |
//! @SYMTestExpectedResults Panic - FSCLIENT:17 |
|
3377 |
//! |
|
3378 |
//! @SYMTestType CIT |
|
3379 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3380 |
CREATE_OBJECT RFs RFs1 |
|
3381 |
CREATE_OBJECT RFile file |
|
3382 |
COMMAND RFs1 new |
|
3383 |
COMMAND RFs1 Connect |
|
3384 |
COMMAND file new |
|
3385 |
COMMAND file Replace PBASE-F32-File-PublicApi-2201-001-Replace_command005 |
|
3386 |
COMMAND file Write PBASE-F32-File-PublicApi-2201-001-Write_command006 |
|
3387 |
COMMAND file Lock PBASE-F32-File-PublicApi-2201-001-Lock_command007 |
|
3388 |
COMMAND file Close |
|
3389 |
COMMAND file ~ |
|
3390 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011 |
|
3391 |
COMMAND RFs1 ~ |
|
3392 |
END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT" |
|
3393 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3394 |
CREATE_OBJECT RFs RFs1 |
|
3395 |
COMMAND RFs1 new |
|
3396 |
COMMAND RFs1 Connect |
|
3397 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011 |
|
3398 |
COMMAND RFs1 ~ |
|
3399 |
END_TEST_BLOCK |
|
3400 |
END_TESTCASE PBASE-F32-File-PublicApi-2201 |
|
3401 |
||
3402 |
||
3403 |
START_TESTCASE PBASE-F32-File-PublicApi-2202 |
|
3404 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2202 |
|
3405 |
//! @SYMAPI RFile |
|
3406 |
//! @SYMTestCaseDesc Function Lock() neg. test - open same file with two handles, try to lock the same region twice. |
|
3407 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
3408 |
//! @SYMTestActions 1. Create RFs session |
|
3409 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2202.txt", EFileWrite, open file as fileOne. |
|
3410 |
//! 3. Lock the file by Calling Lock(). |
|
3411 |
//! 4. Open "{Drives, RAMDriveTestPath}file\tc2202.txt" as fileTwo. |
|
3412 |
//! 5. lock the file 2 at the same position and length as fileOne. |
|
3413 |
//! 6. Close fileOne. |
|
3414 |
//! 7. Close fileTwo |
|
3415 |
//! 8. Delete file |
|
3416 |
//! 9. Close first RFs. |
|
3417 |
//! |
|
3418 |
//! @SYMTestStatus Implemented |
|
3419 |
//! @SYMTestPriority Critical |
|
3420 |
//! @SYMTestExpectedResults Lock() returns KErrLocked at step 5. |
|
3421 |
//! |
|
3422 |
//! @SYMTestType CIT |
|
3423 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3424 |
CREATE_OBJECT RFs RFs1 |
|
3425 |
CREATE_OBJECT RFile file |
|
3426 |
CREATE_OBJECT RFile file2 |
|
3427 |
COMMAND RFs1 new |
|
3428 |
COMMAND RFs1 Connect |
|
3429 |
COMMAND file new |
|
3430 |
COMMAND file Replace PBASE-F32-File-PublicApi-2202-001-Replace_command005 |
|
3431 |
COMMAND file Write PBASE-F32-File-PublicApi-2202-001-Write_command006 |
|
3432 |
COMMAND file Lock PBASE-F32-File-PublicApi-2202-001-Lock_command007 |
|
3433 |
COMMAND file2 new |
|
3434 |
COMMAND file2 Open PBASE-F32-File-PublicApi-2202-001-Open_command010 |
|
3435 |
COMMAND !Error=-22 file2 Lock PBASE-F32-File-PublicApi-2202-001-Lock_command011 |
|
3436 |
COMMAND file2 Close |
|
3437 |
COMMAND file2 ~ |
|
3438 |
COMMAND file Close |
|
3439 |
COMMAND file ~ |
|
3440 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2202-001-Delete_command017 |
|
3441 |
COMMAND RFs1 ~ |
|
3442 |
END_TEST_BLOCK |
|
3443 |
END_TESTCASE PBASE-F32-File-PublicApi-2202 |
|
3444 |
||
3445 |
||
3446 |
START_TESTCASE PBASE-F32-File-PublicApi-2203 |
|
3447 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2203 |
|
3448 |
//! @SYMAPI RFile |
|
3449 |
//! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative length. |
|
3450 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
3451 |
//! @SYMTestActions 1. Create RFs session |
|
3452 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2203.txt", EFileWrite, open file as fileOne. |
|
3453 |
//! 3. Lock the file by Calling Lock() with 0 for pos and -1 for length. |
|
3454 |
//! |
|
3455 |
//! @SYMTestStatus Implemented |
|
3456 |
//! @SYMTestPriority Critical |
|
3457 |
//! @SYMTestExpectedResults Lock() returns panic. |
|
3458 |
//! |
|
3459 |
//! @SYMTestType CIT |
|
3460 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3461 |
CREATE_OBJECT RFs RFs1 |
|
3462 |
CREATE_OBJECT RFile file |
|
3463 |
COMMAND RFs1 new |
|
3464 |
COMMAND RFs1 Connect |
|
3465 |
COMMAND file new |
|
3466 |
COMMAND file Replace PBASE-F32-File-PublicApi-2203-001-Replace_command005 |
|
3467 |
COMMAND file Write PBASE-F32-File-PublicApi-2203-001-Write_command006 |
|
3468 |
COMMAND file Lock PBASE-F32-File-PublicApi-2203-001-Lock_command007 |
|
3469 |
END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT" |
|
3470 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3471 |
CREATE_OBJECT RFs RFs1 |
|
3472 |
COMMAND RFs1 new |
|
3473 |
COMMAND RFs1 Connect |
|
3474 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2203-001-Delete_command011 |
|
3475 |
COMMAND RFs1 ~ |
|
3476 |
END_TEST_BLOCK |
|
3477 |
END_TESTCASE PBASE-F32-File-PublicApi-2203 |
|
3478 |
||
3479 |
||
3480 |
START_TESTCASE PBASE-F32-File-PublicApi-2204 |
|
3481 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2204 |
|
3482 |
//! @SYMAPI RFile |
|
3483 |
//! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative position. |
|
3484 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
3485 |
//! @SYMTestActions 1. Create RFs session |
|
3486 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2204.txt", EFileWrite, open file as fileOne. |
|
3487 |
//! 3. Lock the file by Calling Lock() with -1 for pos and 1 for length. |
|
3488 |
//! 4. Close file. |
|
3489 |
//! 5. Delete file. |
|
3490 |
//! 6. Close RFs. |
|
3491 |
//! |
|
3492 |
//! @SYMTestStatus Implemented |
|
3493 |
//! @SYMTestPriority Critical |
|
3494 |
//! @SYMTestExpectedResults No error returned or panic raised. |
|
3495 |
//! |
|
3496 |
//! @SYMTestType CIT |
|
3497 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3498 |
CREATE_OBJECT RFs RFs1 |
|
3499 |
CREATE_OBJECT RFile file |
|
3500 |
COMMAND RFs1 new |
|
3501 |
COMMAND RFs1 Connect |
|
3502 |
COMMAND file new |
|
3503 |
COMMAND file Replace PBASE-F32-File-PublicApi-2204-001-Replace_command005 |
|
3504 |
COMMAND file Write PBASE-F32-File-PublicApi-2204-001-Write_command006 |
|
3505 |
COMMAND file Lock PBASE-F32-File-PublicApi-2204-001-Lock_command007 |
|
3506 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3507 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3508 |
CREATE_OBJECT RFs RFs1 |
|
3509 |
COMMAND RFs1 new |
|
3510 |
COMMAND RFs1 Connect |
|
3511 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2204-001-Delete_command010 |
|
3512 |
COMMAND RFs1 ~ |
|
3513 |
END_TEST_BLOCK |
|
3514 |
END_TESTCASE PBASE-F32-File-PublicApi-2204 |
|
3515 |
||
3516 |
START_TESTCASE PBASE-F32-File-PublicApi-2205 |
|
3517 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2205 |
|
3518 |
//! @SYMAPI RFile |
|
3519 |
//! @SYMTestCaseDesc Function Lock() neg. test - try to write to locked file. |
|
3520 |
//! Uses API elements: Lock(), Unlock(), Read(). |
|
3521 |
//! @SYMTestActions 1. Create RFs session |
|
3522 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite, open file as file1. |
|
3523 |
//! 3. Call RFile::Open passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite | EFileShareAny, open file as file2. |
|
3524 |
//! 4. Write "test" to file through file1. |
|
3525 |
//! 5. Lock the file by Calling Lock() with 6 for pos and 4 for length, through file1 |
|
3526 |
//! 6. Write "Trying to write to locked region" through new handle |
|
3527 |
//! 7. Close file. |
|
3528 |
//! 8. Close second handle |
|
3529 |
//! 9. Delete file. |
|
3530 |
//! 10. Close RFs. |
|
3531 |
//! |
|
3532 |
//! @SYMTestStatus Implemented |
|
3533 |
//! @SYMTestPriority Critical |
|
3534 |
//! @SYMTestExpectedResults trying to write to locked file returns KErrLocked |
|
3535 |
//! |
|
3536 |
//! @SYMTestType CIT |
|
3537 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3538 |
CREATE_OBJECT RFs RFs1 |
|
3539 |
CREATE_OBJECT RFile file |
|
3540 |
CREATE_OBJECT RFile file2 |
|
3541 |
COMMAND RFs1 new |
|
3542 |
COMMAND RFs1 Connect |
|
3543 |
COMMAND file new |
|
3544 |
COMMAND file Replace PBASE-F32-File-PublicApi-2205-001-Replace_command005 |
|
3545 |
COMMAND file2 new |
|
3546 |
COMMAND file2 Open PBASE-F32-File-PublicApi-2205-001-Open_command008 |
|
3547 |
COMMAND file Write PBASE-F32-File-PublicApi-2205-001-Write_command010 |
|
3548 |
COMMAND file Lock PBASE-F32-File-PublicApi-2205-001-Lock_command011 |
|
3549 |
COMMAND !Error=-22 file2 Write PBASE-F32-File-PublicApi-2205-001-Write_command013 |
|
3550 |
COMMAND file2 Close |
|
3551 |
COMMAND file2 ~ |
|
3552 |
COMMAND file Close |
|
3553 |
COMMAND file ~ |
|
3554 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2205-001-Delete_command020 |
|
3555 |
COMMAND RFs1 ~ |
|
3556 |
END_TEST_BLOCK |
|
3557 |
END_TESTCASE PBASE-F32-File-PublicApi-2205 |
|
3558 |
||
3559 |
// |
|
3560 |
// UnLock |
|
3561 |
// |
|
3562 |
||
3563 |
||
3564 |
START_TESTCASE PBASE-F32-File-PublicApi-2301 |
|
3565 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2301 |
|
3566 |
//! @SYMAPI RFile |
|
3567 |
//! @SYMTestCaseDesc Function UnLock() neg. test - open a file try to unlock a region that has not been locked. |
|
3568 |
//! |
|
3569 |
//! @SYMTestActions 1. Create RFs session |
|
3570 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2301.txt", EFileWrite. |
|
3571 |
//! 3. write "test data" to file. |
|
3572 |
//! 4. call UnLock with position 2 and with length 4 |
|
3573 |
//! 5. close file |
|
3574 |
//! 6. Delete file. |
|
3575 |
//! 7. close fs. |
|
3576 |
//! |
|
3577 |
//! @SYMTestStatus Implemented |
|
3578 |
//! @SYMTestPriority Critical |
|
3579 |
//! @SYMTestExpectedResults UnLock() returns KErrNotFound. |
|
3580 |
//! |
|
3581 |
//! @SYMTestType CIT |
|
3582 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3583 |
CREATE_OBJECT RFs RFs1 |
|
3584 |
CREATE_OBJECT RFile file |
|
3585 |
COMMAND RFs1 new |
|
3586 |
COMMAND RFs1 Connect |
|
3587 |
COMMAND file new |
|
3588 |
COMMAND file Replace PBASE-F32-File-PublicApi-2301-001-Replace_command005 |
|
3589 |
COMMAND file Write PBASE-F32-File-PublicApi-2301-001-Write_command006 |
|
3590 |
COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2301-001-UnLock_command007 |
|
3591 |
COMMAND file Close |
|
3592 |
COMMAND file ~ |
|
3593 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2301-001-Delete_command011 |
|
3594 |
COMMAND RFs1 ~ |
|
3595 |
END_TEST_BLOCK |
|
3596 |
END_TESTCASE PBASE-F32-File-PublicApi-2301 |
|
3597 |
||
3598 |
||
3599 |
START_TESTCASE PBASE-F32-File-PublicApi-2302 |
|
3600 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2302 |
|
3601 |
//! @SYMAPI RFile |
|
3602 |
//! @SYMTestCaseDesc Function UnLock() neg. test - open a file lock some part, try to unlock a portion of the locked region. |
|
3603 |
//! |
|
3604 |
//! @SYMTestActions 1. Create RFs session |
|
3605 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2302.txt", EFileWrite. |
|
3606 |
//! 3. Write some data to file. |
|
3607 |
//! 4. Lock the file by Calling Lock() with pos 0 and length 2. |
|
3608 |
//! 5. UnLock a portion of that file with posi 0 and length 1. |
|
3609 |
//! 6. Close that file. |
|
3610 |
//! 7. Delete file. |
|
3611 |
//! 8. close fs session. |
|
3612 |
//! |
|
3613 |
//! @SYMTestStatus Implemented |
|
3614 |
//! @SYMTestPriority Critical |
|
3615 |
//! @SYMTestExpectedResults UnLock() returns KErrNotFound. |
|
3616 |
//! |
|
3617 |
//! @SYMTestType CIT |
|
3618 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3619 |
CREATE_OBJECT RFs RFs1 |
|
3620 |
CREATE_OBJECT RFile file |
|
3621 |
COMMAND RFs1 new |
|
3622 |
COMMAND RFs1 Connect |
|
3623 |
COMMAND file new |
|
3624 |
COMMAND file Replace PBASE-F32-File-PublicApi-2302-001-Replace_command005 |
|
3625 |
COMMAND file Write PBASE-F32-File-PublicApi-2302-001-Write_command006 |
|
3626 |
COMMAND file Lock PBASE-F32-File-PublicApi-2302-001-Lock_command007 |
|
3627 |
COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2302-001-Close_command008 |
|
3628 |
COMMAND file Close |
|
3629 |
COMMAND file ~ |
|
3630 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2302-001-Delete_command014 |
|
3631 |
COMMAND RFs1 ~ |
|
3632 |
END_TEST_BLOCK |
|
3633 |
END_TESTCASE PBASE-F32-File-PublicApi-2302 |
|
3634 |
||
3635 |
||
3636 |
START_TESTCASE PBASE-F32-File-PublicApi-2303 |
|
3637 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2303 |
|
3638 |
//! @SYMAPI RFile |
|
3639 |
//! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative length |
|
3640 |
//! |
|
3641 |
//! @SYMTestActions 1. Create RFs session |
|
3642 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2303.txt", EFileWrite. |
|
3643 |
//! 3. Write some data to file. |
|
3644 |
//! 4. Call Lock with pos 2, length 2. |
|
3645 |
//! 5. UnLock by calling 2 for position -2 for length. |
|
3646 |
//! |
|
3647 |
//! @SYMTestStatus Implemented |
|
3648 |
//! @SYMTestPriority Critical |
|
3649 |
//! @SYMTestExpectedResults UnLock() causes FSCLIENT:18. |
|
3650 |
//! |
|
3651 |
//! @SYMTestType CIT |
|
3652 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3653 |
CREATE_OBJECT RFs RFs1 |
|
3654 |
CREATE_OBJECT RFile file |
|
3655 |
COMMAND RFs1 new |
|
3656 |
COMMAND RFs1 Connect |
|
3657 |
COMMAND file new |
|
3658 |
COMMAND file Replace PBASE-F32-File-PublicApi-2303-001-Replace_command005 |
|
3659 |
COMMAND file Write PBASE-F32-File-PublicApi-2303-001-Write_command006 |
|
3660 |
COMMAND file Lock PBASE-F32-File-PublicApi-2303-001-Lock_command007 |
|
3661 |
COMMAND file UnLock PBASE-F32-File-PublicApi-2303-001-UnLock_command008 |
|
3662 |
END_TEST_BLOCK !PanicCode=18 !PanicString="FSCLIENT" |
|
3663 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3664 |
CREATE_OBJECT RFs RFs1 |
|
3665 |
COMMAND RFs1 new |
|
3666 |
COMMAND RFs1 Connect |
|
3667 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2303-001-Delete_command011 |
|
3668 |
COMMAND RFs1 ~ |
|
3669 |
END_TEST_BLOCK |
|
3670 |
END_TESTCASE PBASE-F32-File-PublicApi-2303 |
|
3671 |
||
3672 |
||
3673 |
START_TESTCASE PBASE-F32-File-PublicApi-2304 |
|
3674 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2304 |
|
3675 |
//! @SYMAPI RFile |
|
3676 |
//! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative position |
|
3677 |
//! |
|
3678 |
//! @SYMTestActions 1. Create RFs session |
|
3679 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2304.txt", EFileWrite. |
|
3680 |
//! 3. Write some data to file. |
|
3681 |
//! 4. Call Lock with pos 2, length 2. |
|
3682 |
//! 5. UnLock by calling -2 for position 2 for length. |
|
3683 |
//! 6. Close that file. |
|
3684 |
//! 7. Delete file. |
|
3685 |
//! 8. close fs session. |
|
3686 |
//! |
|
3687 |
//! @SYMTestStatus Implemented |
|
3688 |
//! @SYMTestPriority Critical |
|
3689 |
//! @SYMTestExpectedResults RFile::UnLock() causes FSCLIENT:19. |
|
3690 |
//! |
|
3691 |
//! @SYMTestType CIT |
|
3692 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3693 |
CREATE_OBJECT RFs RFs1 |
|
3694 |
CREATE_OBJECT RFile file |
|
3695 |
COMMAND RFs1 new |
|
3696 |
COMMAND RFs1 Connect |
|
3697 |
COMMAND file new |
|
3698 |
COMMAND file Replace PBASE-F32-File-PublicApi-2304-001-Replace_command005 |
|
3699 |
COMMAND file Write PBASE-F32-File-PublicApi-2304-001-Write_command006 |
|
3700 |
COMMAND file Lock PBASE-F32-File-PublicApi-2304-001-Lock_command007 |
|
3701 |
COMMAND file UnLock PBASE-F32-File-PublicApi-2304-001-UnLock_command008 |
|
3702 |
END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" |
|
3703 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3704 |
CREATE_OBJECT RFs RFs1 |
|
3705 |
COMMAND RFs1 new |
|
3706 |
COMMAND RFs1 Connect |
|
3707 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2304-001-Delete_command012 |
|
3708 |
COMMAND RFs1 ~ |
|
3709 |
END_TEST_BLOCK |
|
3710 |
END_TESTCASE PBASE-F32-File-PublicApi-2304 |
|
3711 |
||
3712 |
||
3713 |
// |
|
3714 |
// Seek |
|
3715 |
// |
|
3716 |
||
3717 |
||
3718 |
START_TESTCASE PBASE-F32-File-PublicApi-2401 |
|
3719 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2401 |
|
3720 |
//! @SYMAPI RFile |
|
3721 |
//! @SYMTestCaseDesc Function Seek() neg. test - try to seek to negative position. |
|
3722 |
//! |
|
3723 |
//! @SYMTestActions 1. Create RFs session |
|
3724 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2401.txt", EFileWrite. |
|
3725 |
//! 3. Write "Seek test" to file. |
|
3726 |
//! 4. Call RFile::Seek() passing ESeekStart, -10. |
|
3727 |
//! 5. Close file. |
|
3728 |
//! 6. Delete file. |
|
3729 |
//! 7. Close fs session. |
|
3730 |
//! |
|
3731 |
//! @SYMTestStatus Implemented |
|
3732 |
//! @SYMTestPriority Critical |
|
3733 |
//! @SYMTestExpectedResults Seek returns KErrArgument. |
|
3734 |
//! |
|
3735 |
//! @SYMTestType CIT |
|
3736 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3737 |
CREATE_OBJECT RFs RFs1 |
|
3738 |
CREATE_OBJECT RFile file |
|
3739 |
COMMAND RFs1 new |
|
3740 |
COMMAND RFs1 Connect |
|
3741 |
COMMAND file new |
|
3742 |
COMMAND file Replace PBASE-F32-File-PublicApi-2401-001-Replace_command005 |
|
3743 |
COMMAND file Write PBASE-F32-File-PublicApi-2401-001-Write_command006 |
|
3744 |
COMMAND !Error=-6 file Seek PBASE-F32-File-PublicApi-2401-001-Seek_command007 |
|
3745 |
COMMAND file Close |
|
3746 |
COMMAND file ~ |
|
3747 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2401-001-Delete_command011 |
|
3748 |
COMMAND RFs1 ~ |
|
3749 |
END_TEST_BLOCK |
|
3750 |
END_TESTCASE PBASE-F32-File-PublicApi-2401 |
|
3751 |
||
3752 |
||
3753 |
// |
|
3754 |
// Flush |
|
3755 |
// |
|
3756 |
||
3757 |
||
3758 |
||
3759 |
||
3760 |
// |
|
3761 |
// Size |
|
3762 |
// |
|
3763 |
||
3764 |
||
3765 |
||
3766 |
||
3767 |
// |
|
3768 |
// SetSize |
|
3769 |
// |
|
3770 |
||
3771 |
||
3772 |
START_TESTCASE PBASE-F32-File-PublicApi-2701 |
|
3773 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2701 |
|
3774 |
//! @SYMAPI RFile |
|
3775 |
//! @SYMTestCaseDesc Function SetSize() neg test - try to pass a negative size. |
|
3776 |
//! |
|
3777 |
//! @SYMTestActions 1. Create RFs session. |
|
3778 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2701.txt", EFileWrite. |
|
3779 |
//! 3. Write "test" to file. |
|
3780 |
//! 3. Call SetSize with -2. |
|
3781 |
//! |
|
3782 |
//! @SYMTestStatus Implemented |
|
3783 |
//! @SYMTestPriority Critical |
|
3784 |
//! @SYMTestExpectedResults Panic - FSCLIENT:20 |
|
3785 |
//! |
|
3786 |
//! @SYMTestType CIT |
|
3787 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3788 |
CREATE_OBJECT RFs RFs1 |
|
3789 |
CREATE_OBJECT RFile file |
|
3790 |
COMMAND RFs1 new |
|
3791 |
COMMAND RFs1 Connect |
|
3792 |
COMMAND file new |
|
3793 |
COMMAND file Replace PBASE-F32-File-PublicApi-2701-001-Replace_command005 |
|
3794 |
COMMAND file Write PBASE-F32-File-PublicApi-2701-001-Write_command006 |
|
3795 |
COMMAND file SetSize PBASE-F32-File-PublicApi-2701-001-SetSize_command007 |
|
3796 |
COMMAND file Close |
|
3797 |
COMMAND file ~ |
|
3798 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011 |
|
3799 |
COMMAND RFs1 ~ |
|
3800 |
END_TEST_BLOCK !PanicCode=20 !PanicString="FSCLIENT" |
|
3801 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3802 |
CREATE_OBJECT RFs RFs1 |
|
3803 |
COMMAND RFs1 new |
|
3804 |
COMMAND RFs1 Connect |
|
3805 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011 |
|
3806 |
COMMAND RFs1 ~ |
|
3807 |
END_TEST_BLOCK |
|
3808 |
END_TESTCASE PBASE-F32-File-PublicApi-2701 |
|
3809 |
||
3810 |
||
3811 |
// |
|
3812 |
// Att |
|
3813 |
// |
|
3814 |
||
3815 |
||
3816 |
||
3817 |
// |
|
3818 |
// SetAtt |
|
3819 |
// |
|
3820 |
||
3821 |
||
3822 |
START_TESTCASE PBASE-F32-File-PublicApi-2901 |
|
3823 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-2901 |
|
3824 |
//! @SYMAPI RFile |
|
3825 |
//! @SYMTestCaseDesc Function SetAtt neg. test - set same attribute on both bitmasks. |
|
3826 |
//! Uses API elements: Att(). |
|
3827 |
//! @SYMTestActions 1. Create RFs session. |
|
3828 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2901.txt", EFileWrite. |
|
3829 |
//! 3. Write "test" to file. |
|
3830 |
//! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttNormal |
|
3831 |
//! |
|
3832 |
//! |
|
3833 |
//! @SYMTestStatus Implemented |
|
3834 |
//! @SYMTestPriority Critical |
|
3835 |
//! @SYMTestExpectedResults Panic FSCLIENT:21 at step 3. |
|
3836 |
//! |
|
3837 |
//! @SYMTestType CIT |
|
3838 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3839 |
CREATE_OBJECT RFs RFs1 |
|
3840 |
CREATE_OBJECT RFile file |
|
3841 |
COMMAND RFs1 new |
|
3842 |
COMMAND RFs1 Connect |
|
3843 |
COMMAND file new |
|
3844 |
COMMAND file Replace PBASE-F32-File-PublicApi-2901-001-Replace_command005 |
|
3845 |
COMMAND file Write PBASE-F32-File-PublicApi-2901-001-Write_command006 |
|
3846 |
COMMAND file SetAtt PBASE-F32-File-PublicApi-2901-001-SetAtt_command007 |
|
3847 |
COMMAND file Close |
|
3848 |
COMMAND file ~ |
|
3849 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011 |
|
3850 |
COMMAND RFs1 ~ |
|
3851 |
END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic" |
|
3852 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3853 |
CREATE_OBJECT RFs RFs1 |
|
3854 |
COMMAND RFs1 new |
|
3855 |
COMMAND RFs1 Connect |
|
3856 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011 |
|
3857 |
COMMAND RFs1 ~ |
|
3858 |
END_TEST_BLOCK |
|
3859 |
END_TESTCASE PBASE-F32-File-PublicApi-2901 |
|
3860 |
||
3861 |
||
3862 |
// |
|
3863 |
// Modified |
|
3864 |
// |
|
3865 |
||
3866 |
||
3867 |
||
3868 |
// |
|
3869 |
// SetModified |
|
3870 |
// |
|
3871 |
||
3872 |
||
3873 |
START_TESTCASE PBASE-F32-File-PublicApi-3101 |
|
3874 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3101 |
|
3875 |
//! @SYMAPI RFile |
|
3876 |
//! @SYMTestCaseDesc Function SetModified neg. test - open file for reading and set it's date. |
|
3877 |
//! Uses API elements: Modified(), SetModified(). |
|
3878 |
//! @SYMTestActions 1. Create RFs session. |
|
3879 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3101.txt", EFileWrite. |
|
3880 |
//! 3. Write "test" to file |
|
3881 |
//! 4. Call RFile::SetModified. |
|
3882 |
//! 5. Close file. |
|
3883 |
//! 6. Delete file. |
|
3884 |
//! 7. Close fs. |
|
3885 |
//! |
|
3886 |
//! @SYMTestStatus Implemented |
|
3887 |
//! @SYMTestPriority Critical |
|
3888 |
//! @SYMTestExpectedResults RFile::SetModified returns KErrAccessDenied. |
|
3889 |
//! |
|
3890 |
//! @SYMTestType CIT |
|
3891 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3892 |
CREATE_OBJECT RFs RFs1 |
|
3893 |
CREATE_OBJECT RFile file |
|
3894 |
COMMAND RFs1 new |
|
3895 |
COMMAND RFs1 Connect |
|
3896 |
COMMAND file new |
|
3897 |
COMMAND file Replace PBASE-F32-File-PublicApi-3101-001-Replace_command005 |
|
3898 |
COMMAND file Write PBASE-F32-File-PublicApi-3101-001-Write_command006 |
|
3899 |
COMMAND file Close |
|
3900 |
COMMAND file Open PBASE-F32-File-PublicApi-3101-001-Open_command008 |
|
3901 |
COMMAND !Error=-21 file SetModified PBASE-F32-File-PublicApi-3101-001-SetModified_command009 |
|
3902 |
COMMAND file Close |
|
3903 |
COMMAND file ~ |
|
3904 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3101-001-Delete_command013 |
|
3905 |
COMMAND RFs1 ~ |
|
3906 |
END_TEST_BLOCK |
|
3907 |
END_TESTCASE PBASE-F32-File-PublicApi-3101 |
|
3908 |
||
3909 |
||
3910 |
// |
|
3911 |
// ChangeMode |
|
3912 |
// |
|
3913 |
||
3914 |
||
3915 |
START_TESTCASE PBASE-F32-File-PublicApi-5501 |
|
3916 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-5501 |
|
3917 |
//! @SYMAPI RFile |
|
3918 |
//! @SYMTestCaseDesc Function ChangeMode() neg. test - call ChangeMode with value outside of set (EFileShareExclusive, EFileShareReadersOnly). |
|
3919 |
//! Uses API elements: SetModified(). |
|
3920 |
//! @SYMTestActions 1. Create RFs session. |
|
3921 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc5501.txt", EFileShareExclusive. |
|
3922 |
//! 3. Write "test" to file. |
|
3923 |
//! 4. Call RFile::ChangeMode() passing it EFileWrite. |
|
3924 |
//! 5. Close RFile. |
|
3925 |
//! 6. Delete file. |
|
3926 |
//! 7. Close RFs. |
|
3927 |
//! |
|
3928 |
//! @SYMTestStatus Implemented |
|
3929 |
//! @SYMTestPriority Critical |
|
3930 |
//! @SYMTestExpectedResults RFile::ChangeMode() returns KErrArgument. |
|
3931 |
//! |
|
3932 |
//! @SYMTestType CIT |
|
3933 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3934 |
CREATE_OBJECT RFs RFs1 |
|
3935 |
CREATE_OBJECT RFile file |
|
3936 |
COMMAND RFs1 new |
|
3937 |
COMMAND RFs1 Connect |
|
3938 |
COMMAND file new |
|
3939 |
COMMAND file Replace PBASE-F32-File-PublicApi-5501-001-Replace_command005 |
|
3940 |
COMMAND file Write PBASE-F32-File-PublicApi-5501-001-Write_command006 |
|
3941 |
COMMAND !Error=-6 file ChangeMode PBASE-F32-File-PublicApi-5501-001-ChangeMode_command007 |
|
3942 |
COMMAND file Close |
|
3943 |
COMMAND file ~ |
|
3944 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-5501-001-Delete_command011 |
|
3945 |
COMMAND RFs1 ~ |
|
3946 |
END_TEST_BLOCK |
|
3947 |
END_TESTCASE PBASE-F32-File-PublicApi-5501 |
|
3948 |
||
3949 |
// |
|
3950 |
// Set |
|
3951 |
// |
|
3952 |
||
3953 |
||
3954 |
START_TESTCASE PBASE-F32-File-PublicApi-3201 |
|
3955 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3201 |
|
3956 |
//! @SYMAPI RFile |
|
3957 |
//! @SYMTestCaseDesc Function Set() neg. test - try to clear and set the same attribute. |
|
3958 |
//! Uses API elements: Set(), Modified(), Att(). |
|
3959 |
//! @SYMTestActions 1. Create RFs session. |
|
3960 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3201.txt", EFileShareAny. |
|
3961 |
//! 3. Call RFile::Set() passing it 20070118:, KEntryAttReadOnly, KEntryAttReadOnly. |
|
3962 |
//! 4. Close file |
|
3963 |
//! 5. Delete file. |
|
3964 |
//! 6. Close Fs session |
|
3965 |
//! |
|
3966 |
//! @SYMTestStatus Implemented |
|
3967 |
//! @SYMTestPriority Critical |
|
3968 |
//! @SYMTestExpectedResults Panic - FSCLIENT:21. |
|
3969 |
//! |
|
3970 |
//! @SYMTestType CIT |
|
3971 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3972 |
CREATE_OBJECT RFs RFs1 |
|
3973 |
CREATE_OBJECT RFile file |
|
3974 |
COMMAND RFs1 new |
|
3975 |
COMMAND RFs1 Connect |
|
3976 |
COMMAND file new |
|
3977 |
COMMAND file Replace PBASE-F32-File-PublicApi-3201-001-Replace_command005 |
|
3978 |
COMMAND file Write PBASE-F32-File-PublicApi-3201-001-Write_command006 |
|
3979 |
COMMAND file Set PBASE-F32-File-PublicApi-3201-001-Set_command007 |
|
3980 |
COMMAND file Close |
|
3981 |
COMMAND file ~ |
|
3982 |
COMMAND RFs1 ~ |
|
3983 |
END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic" |
|
3984 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
3985 |
CREATE_OBJECT RFs RFs1 |
|
3986 |
COMMAND RFs1 new |
|
3987 |
COMMAND RFs1 Connect |
|
3988 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3201-001-Delete_command011 |
|
3989 |
COMMAND RFs1 ~ |
|
3990 |
END_TEST_BLOCK |
|
3991 |
END_TESTCASE PBASE-F32-File-PublicApi-3201 |
|
3992 |
||
3993 |
||
3994 |
||
3995 |
// |
|
3996 |
// Rename |
|
3997 |
// |
|
3998 |
||
3999 |
||
4000 |
START_TESTCASE PBASE-F32-File-PublicApi-3401 |
|
4001 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3401 |
|
4002 |
//! @SYMAPI RFile |
|
4003 |
//! @SYMTestCaseDesc Function Rename() neg. test - open file in read mode and try to rename it. |
|
4004 |
//! Uses API elements: RFile::Rename(). |
|
4005 |
//! @SYMTestActions 1. Create RFs session. |
|
4006 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3401.txt", EFileRead. |
|
4007 |
//! 3. Write "test" to file. |
|
4008 |
//! 4. Call RFile::Rename() passing it string literal "test_renamed.txt". |
|
4009 |
//! 5. Close RFile. |
|
4010 |
//! 6. Delete file. |
|
4011 |
//! 7. Close RFs. |
|
4012 |
//! |
|
4013 |
//! @SYMTestStatus Implemented |
|
4014 |
//! @SYMTestPriority Critical |
|
4015 |
//! @SYMTestExpectedResults RFile::Rename() returns KErrAccessDenied. |
|
4016 |
//! |
|
4017 |
//! @SYMTestType CIT |
|
4018 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4019 |
CREATE_OBJECT RFs RFs1 |
|
4020 |
CREATE_OBJECT RFile file |
|
4021 |
COMMAND RFs1 new |
|
4022 |
COMMAND RFs1 Connect |
|
4023 |
COMMAND file new |
|
4024 |
COMMAND file Replace PBASE-F32-File-PublicApi-3401-001-Replace_command005 |
|
4025 |
COMMAND file Write PBASE-F32-File-PublicApi-3401-001-Write_command006 |
|
4026 |
COMMAND file Close |
|
4027 |
COMMAND file Open PBASE-F32-File-PublicApi-3401-001-Open_command008 |
|
4028 |
COMMAND !Error=-21 file Rename PBASE-F32-File-PublicApi-3401-001-Rename_command009 |
|
4029 |
COMMAND file Close |
|
4030 |
COMMAND file ~ |
|
4031 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3401-001-Delete_command12 |
|
4032 |
COMMAND RFs1 ~ |
|
4033 |
END_TEST_BLOCK |
|
4034 |
||
4035 |
END_TESTCASE PBASE-F32-File-PublicApi-3401 |
|
4036 |
||
4037 |
||
4038 |
||
4039 |
START_TESTCASE PBASE-F32-File-PublicApi-3402 |
|
4040 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3402 |
|
4041 |
//! @SYMAPI RFile |
|
4042 |
//! @SYMTestCaseDesc Function BlockMap() negative test, replace a file and then call BlockMap on it. |
|
4043 |
//! Uses API elements: Open(), BlockMap(). |
|
4044 |
//! @SYMTestActions 1. Create RFs session. |
|
4045 |
//! 2. Call RFile::Replace() passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3402.txt", EFileRead. |
|
4046 |
//! 4. Call RFile::BlockMap(). |
|
4047 |
//! 5. Close RFile. |
|
4048 |
//! 6. Delete file. |
|
4049 |
//! 7. Close RFs. |
|
4050 |
//! |
|
4051 |
//! @SYMTestStatus Implemented |
|
4052 |
//! @SYMTestPriority Critical |
|
4053 |
//! @SYMTestExpectedResults BlockMap returns KErrNotSupported. |
|
4054 |
//! |
|
4055 |
//! @SYMTestType CIT |
|
4056 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4057 |
CREATE_OBJECT RFs RFs1 |
|
4058 |
CREATE_OBJECT RFile file |
|
4059 |
COMMAND RFs1 new |
|
4060 |
COMMAND RFs1 Connect |
|
4061 |
COMMAND file new |
|
4062 |
COMMAND file Replace PBASE-F32-File-PublicApi-3402-001-Replace_command003 |
|
4063 |
COMMAND !Error=-5 file BlockMap |
|
4064 |
COMMAND file Close |
|
4065 |
COMMAND file ~ |
|
4066 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3402-001-Delete_command007 |
|
4067 |
COMMAND RFs1 ~ |
|
4068 |
END_TEST_BLOCK |
|
4069 |
END_TESTCASE PBASE-F32-File-PublicApi-3402 |
|
4070 |
||
4071 |
||
4072 |
START_TESTCASE PBASE-F32-File-PublicApi-3403 |
|
4073 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3403 |
|
4074 |
//! @SYMAPI RFile |
|
4075 |
//! @SYMTestCaseDesc Function BlockMap() negative test. Call BlockMap with Usage ETestDebug |
|
4076 |
//! Uses API elements: Open(), BlockMap(). |
|
4077 |
//! @SYMTestActions 1. Create RFs session. |
|
4078 |
//! 2. Call RFile::Replace() to create file tc3403 with EFileWrite |
|
4079 |
//! 4. Call RFile::BlockMap() passing ETestDebug for usage, 0 for startPos. |
|
4080 |
//! 5. Close RFile. |
|
4081 |
//! 6. Delete file. |
|
4082 |
//! 7. Close RFs. |
|
4083 |
//! |
|
4084 |
//! @SYMTestStatus Implemented |
|
4085 |
//! @SYMTestPriority Critical |
|
4086 |
//! @SYMTestExpectedResults BlockMap returns KErrNotSupported. |
|
4087 |
//! |
|
4088 |
//! @SYMTestType CIT |
|
4089 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4090 |
CREATE_OBJECT RFs RFs1 |
|
4091 |
CREATE_OBJECT RFile file |
|
4092 |
COMMAND RFs1 new |
|
4093 |
COMMAND RFs1 Connect |
|
4094 |
COMMAND file new |
|
4095 |
COMMAND file Replace PBASE-F32-File-PublicApi-3403-001-Replace_command003 |
|
4096 |
COMMAND !Error=-5 file BlockMap PBASE-F32-File-PublicApi-3403-001-BlockMap_command004 |
|
4097 |
COMMAND file Close |
|
4098 |
COMMAND file ~ |
|
4099 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3403-001-Delete_command007 |
|
4100 |
COMMAND RFs1 ~ |
|
4101 |
END_TEST_BLOCK |
|
4102 |
END_TESTCASE PBASE-F32-File-PublicApi-3403 |
|
4103 |
||
4104 |
||
4105 |
START_TESTCASE PBASE-F32-File-PublicApi-3501 |
|
4106 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3501 |
|
4107 |
//! @SYMAPI RFile |
|
4108 |
//! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length. |
|
4109 |
//! Uses API elements: Read(). |
|
4110 |
//! @SYMTestActions 1. Create RFs session. |
|
4111 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3501.txt", EFileWrite. |
|
4112 |
//! 3. Call RFile::Write passing literal "Asynchronous read with length test" |
|
4113 |
//! 4. Reset file position |
|
4114 |
//! 4. Create TRequestStatus variable. |
|
4115 |
//! 5. Call RFile::Read() passing TRequestStatus and 0 for length. |
|
4116 |
//! 6. Wait until asynchronous call completes |
|
4117 |
//! 7. Close RFile. |
|
4118 |
//! 8. Delete file. |
|
4119 |
//! 9. Close RFs. |
|
4120 |
//! |
|
4121 |
//! @SYMTestStatus Implemented |
|
4122 |
//! @SYMTestPriority Critical |
|
4123 |
//! @SYMTestExpectedResults RFile::Read() returns empty descriptor |
|
4124 |
//! |
|
4125 |
//! @SYMTestType CIT |
|
4126 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4127 |
CREATE_OBJECT RFs RFs1 |
|
4128 |
CREATE_OBJECT RFile file |
|
4129 |
COMMAND RFs1 new |
|
4130 |
COMMAND RFs1 Connect |
|
4131 |
COMMAND file new |
|
4132 |
COMMAND file Replace PBASE-F32-File-PublicApi-3501-001-Replace_command005 |
|
4133 |
COMMAND file Write PBASE-F32-File-PublicApi-3501-001-Write_command006 |
|
4134 |
COMMAND file Seek PBASE-F32-File-PublicApi-3501-001-Seek_command007 |
|
4135 |
COMMAND file Read PBASE-F32-File-PublicApi-3501-001-Read_command008 |
|
4136 |
OUTSTANDING |
|
4137 |
COMMAND file Close |
|
4138 |
COMMAND file ~ |
|
4139 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3501-001-Delete_command012 |
|
4140 |
COMMAND RFs1 ~ |
|
4141 |
END_TEST_BLOCK |
|
4142 |
END_TESTCASE PBASE-F32-File-PublicApi-3501 |
|
4143 |
||
4144 |
||
4145 |
START_TESTCASE PBASE-F32-File-PublicApi-3502 |
|
4146 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3502 |
|
4147 |
//! @SYMAPI RFile |
|
4148 |
//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test. Pass 0 for length. |
|
4149 |
//! Uses API elements: Read(). |
|
4150 |
//! @SYMTestActions 1. Create RFs session |
|
4151 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3502.txt", EFileWrite |
|
4152 |
//! 3. Write "synchronous read with length and position test" to file |
|
4153 |
//! 4. Reset file position. |
|
4154 |
//! 5. Call RFile::Read() passing 0 for length and 5 for position. |
|
4155 |
//! 6. Close RFile. |
|
4156 |
//! 7. Delete file. |
|
4157 |
//! 8. Close RFs. |
|
4158 |
//! |
|
4159 |
//! @SYMTestStatus Implemented |
|
4160 |
//! @SYMTestPriority Critical |
|
4161 |
//! @SYMTestExpectedResults RFile::Read() returns empty descriptor |
|
4162 |
//! |
|
4163 |
//! @SYMTestType CIT |
|
4164 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4165 |
CREATE_OBJECT RFs RFs1 |
|
4166 |
CREATE_OBJECT RFile file |
|
4167 |
COMMAND RFs1 new |
|
4168 |
COMMAND RFs1 Connect |
|
4169 |
COMMAND file new |
|
4170 |
COMMAND file Replace PBASE-F32-File-PublicApi-3502-001-Replace_command005 |
|
4171 |
COMMAND file Write PBASE-F32-File-PublicApi-3502-001-Write_command006 |
|
4172 |
COMMAND file Seek PBASE-F32-File-PublicApi-3502-001-Seek_command007 |
|
4173 |
COMMAND file Read PBASE-F32-File-PublicApi-3502-001-Read_command008 |
|
4174 |
COMMAND file Close |
|
4175 |
COMMAND file ~ |
|
4176 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3502-001-Delete_command012 |
|
4177 |
COMMAND RFs1 ~ |
|
4178 |
END_TEST_BLOCK |
|
4179 |
END_TESTCASE PBASE-F32-File-PublicApi-3502 |
|
4180 |
||
4181 |
||
4182 |
START_TESTCASE PBASE-F32-File-PublicApi-3503 |
|
4183 |
//! @SYMTestCaseID PBASE-F32-File-PublicApi-3503 |
|
4184 |
//! @SYMAPI RFile |
|
4185 |
//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length. |
|
4186 |
//! Uses API elements: Read(). |
|
4187 |
//! @SYMTestActions 1. Create RFs session. |
|
4188 |
//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3503.txt", EFileWrite. |
|
4189 |
//! 3. Call RFile::Write passing literal "asynchronous read with length and position test" |
|
4190 |
//! 4. Reset file position |
|
4191 |
//! 5. Call RFile::Read() passing TRequestStatus, 0 for length and 5 for position. |
|
4192 |
//! 6. Wait until asynchronous call completes |
|
4193 |
//! 7. Close RFile. |
|
4194 |
//! 8. Delete file. |
|
4195 |
//! 9. Close RFs. |
|
4196 |
//! |
|
4197 |
//! @SYMTestStatus Implemented |
|
4198 |
//! @SYMTestPriority Critical |
|
4199 |
//! @SYMTestExpectedResults RFile::Read() returns empty descriptor |
|
4200 |
//! |
|
4201 |
//! @SYMTestType CIT |
|
4202 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4203 |
CREATE_OBJECT RFs RFs1 |
|
4204 |
CREATE_OBJECT RFile file |
|
4205 |
COMMAND RFs1 new |
|
4206 |
COMMAND RFs1 Connect |
|
4207 |
COMMAND file new |
|
4208 |
COMMAND file Replace PBASE-F32-File-PublicApi-3503-001-Replace_command005 |
|
4209 |
COMMAND file Write PBASE-F32-File-PublicApi-3503-001-Write_command006 |
|
4210 |
COMMAND file Seek PBASE-F32-File-PublicApi-3503-001-Seek_command007 |
|
4211 |
COMMAND file Read PBASE-F32-File-PublicApi-3503-001-Read_command008 |
|
4212 |
OUTSTANDING |
|
4213 |
COMMAND file Close |
|
4214 |
COMMAND file ~ |
|
4215 |
COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3503-001-Delete_command011 |
|
4216 |
COMMAND RFs1 ~ |
|
4217 |
END_TEST_BLOCK |
|
4218 |
END_TESTCASE PBASE-F32-File-PublicApi-3503 |
|
4219 |
||
4220 |
START_TESTCASE PBASE-F32-File-Uninstall |
|
4221 |
//! @SYMTestCaseID PBASE-F32-File-Uninstall |
|
4222 |
//! @SYMAPI RFile |
|
4223 |
//! @SYMTestCaseDesc Cleanup the directories created to test RFile |
|
4224 |
//! @SYMTestActions 1. Create RFs Session. |
|
4225 |
//! 2. Remove the directories created using Rfs::RmDir(). |
|
4226 |
//! @SYMTestStatus Implemented |
|
4227 |
//! @SYMTestPriority Critical |
|
4228 |
//! @SYMTestExpectedResults Removes the directory created and keeps the environment clean. |
|
4229 |
//! |
|
4230 |
//! @SYMTestType CIT |
|
4231 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini |
|
4232 |
CREATE_OBJECT RFs RFs1 |
|
4233 |
COMMAND RFs1 new |
|
4234 |
COMMAND RFs1 Connect |
|
4235 |
COMMAND RFs1 RmDir PBASE-F32-File-PublicApi-Unistall |
|
4236 |
COMMAND RFs1 ~ |
|
4237 |
END_TEST_BLOCK |
|
4238 |
END_TESTCASE PBASE-F32-File-Uninstall |