sl@0
|
1 |
//
|
sl@0
|
2 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
// All rights reserved.
|
sl@0
|
4 |
// This component and the accompanying materials are made available
|
sl@0
|
5 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
// which accompanies this distribution, and is available
|
sl@0
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
//
|
sl@0
|
9 |
// Initial Contributors:
|
sl@0
|
10 |
// Nokia Corporation - initial contribution.
|
sl@0
|
11 |
//
|
sl@0
|
12 |
// Contributors:
|
sl@0
|
13 |
//
|
sl@0
|
14 |
// Description:
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//! @file
|
sl@0
|
17 |
//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-rem
|
sl@0
|
18 |
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
|
sl@0
|
19 |
//! @SYMScriptAuthor Alvar Udras, Runno Sgirka
|
sl@0
|
20 |
//! @SYMScriptDescription The test script contains API tests for the following functions of RFormat class:
|
sl@0
|
21 |
//! TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount);
|
sl@0
|
22 |
//! TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);
|
sl@0
|
23 |
//! void Close();
|
sl@0
|
24 |
//! TInt Next(TInt &aStep);
|
sl@0
|
25 |
//! void Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus);
|
sl@0
|
26 |
|
sl@0
|
27 |
LOAD_SUITE t_sfsrv
|
sl@0
|
28 |
DELAY 5000
|
sl@0
|
29 |
|
sl@0
|
30 |
|
sl@0
|
31 |
START_TESTCASE PBASE-F32-Format-PublicApi-0001
|
sl@0
|
32 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0001
|
sl@0
|
33 |
//! @SYMAPI RFormat
|
sl@0
|
34 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
35 |
//! using EQuickFormat as format mode and close it.
|
sl@0
|
36 |
//! Uses API elements: Open(), Close().
|
sl@0
|
37 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
38 |
//! 2. Connect the RFs session.
|
sl@0
|
39 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
40 |
//! removable drive letter, EQuickFormat, aCount as parameters.
|
sl@0
|
41 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
42 |
//! 5. Close RFs session.
|
sl@0
|
43 |
//! @SYMTestStatus Implemented
|
sl@0
|
44 |
//! @SYMTestPriority Critical
|
sl@0
|
45 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
46 |
//! @SYMTestType CIT
|
sl@0
|
47 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
48 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
49 |
CREATE_OBJECT RFormat format1
|
sl@0
|
50 |
COMMAND rfs1 new
|
sl@0
|
51 |
COMMAND rfs1 Connect
|
sl@0
|
52 |
COMMAND format1 new
|
sl@0
|
53 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0001-001-Open_command05
|
sl@0
|
54 |
COMMAND format1 Close
|
sl@0
|
55 |
COMMAND format1 ~
|
sl@0
|
56 |
COMMAND rfs1 Close
|
sl@0
|
57 |
COMMAND rfs1 ~
|
sl@0
|
58 |
END_TEST_BLOCK
|
sl@0
|
59 |
END_TESTCASE PBASE-F32-Format-PublicApi-0001
|
sl@0
|
60 |
|
sl@0
|
61 |
|
sl@0
|
62 |
START_TESTCASE PBASE-F32-Format-PublicApi-0002
|
sl@0
|
63 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0002
|
sl@0
|
64 |
//! @SYMAPI RFormat
|
sl@0
|
65 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
66 |
//! using EHighDensity as format mode and close it.
|
sl@0
|
67 |
//! Uses API elements: Open(), Close().
|
sl@0
|
68 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
69 |
//! 2. Connect the RFs session.
|
sl@0
|
70 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
71 |
//! removable drive letter, EHighDensity, aCount as parameters.
|
sl@0
|
72 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
73 |
//! 5. Close RFs session.
|
sl@0
|
74 |
//! @SYMTestStatus Implemented
|
sl@0
|
75 |
//! @SYMTestPriority Critical
|
sl@0
|
76 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
77 |
//! @SYMTestType CIT
|
sl@0
|
78 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
79 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
80 |
CREATE_OBJECT RFormat format1
|
sl@0
|
81 |
COMMAND rfs1 new
|
sl@0
|
82 |
COMMAND rfs1 Connect
|
sl@0
|
83 |
COMMAND format1 new
|
sl@0
|
84 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0002-001-Open_command05
|
sl@0
|
85 |
COMMAND format1 Close
|
sl@0
|
86 |
COMMAND format1 ~
|
sl@0
|
87 |
COMMAND rfs1 Close
|
sl@0
|
88 |
COMMAND rfs1 ~
|
sl@0
|
89 |
END_TEST_BLOCK
|
sl@0
|
90 |
END_TESTCASE PBASE-F32-Format-PublicApi-0002
|
sl@0
|
91 |
|
sl@0
|
92 |
|
sl@0
|
93 |
START_TESTCASE PBASE-F32-Format-PublicApi-0003
|
sl@0
|
94 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0003
|
sl@0
|
95 |
//! @SYMAPI RFormat
|
sl@0
|
96 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
97 |
//! using ELowDensity as format mode and close it.
|
sl@0
|
98 |
//! Uses API elements: Open(), Close().
|
sl@0
|
99 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
100 |
//! 2. Connect the RFs session.
|
sl@0
|
101 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
102 |
//! removable drive letter, ELowDensity, aCount as parameters.
|
sl@0
|
103 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
104 |
//! 5. Close RFs session.
|
sl@0
|
105 |
//! @SYMTestStatus Implemented
|
sl@0
|
106 |
//! @SYMTestPriority Critical
|
sl@0
|
107 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
108 |
//! @SYMTestType CIT
|
sl@0
|
109 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
110 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
111 |
CREATE_OBJECT RFormat format1
|
sl@0
|
112 |
COMMAND rfs1 new
|
sl@0
|
113 |
COMMAND rfs1 Connect
|
sl@0
|
114 |
COMMAND format1 new
|
sl@0
|
115 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0003-001-Open_command05
|
sl@0
|
116 |
COMMAND format1 Close
|
sl@0
|
117 |
COMMAND format1 ~
|
sl@0
|
118 |
COMMAND rfs1 Close
|
sl@0
|
119 |
COMMAND rfs1 ~
|
sl@0
|
120 |
END_TEST_BLOCK
|
sl@0
|
121 |
END_TESTCASE PBASE-F32-Format-PublicApi-0003
|
sl@0
|
122 |
|
sl@0
|
123 |
|
sl@0
|
124 |
START_TESTCASE PBASE-F32-Format-PublicApi-0004
|
sl@0
|
125 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0004
|
sl@0
|
126 |
//! @SYMAPI RFormat
|
sl@0
|
127 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
128 |
//! using EFullFormat as format mode and close it.
|
sl@0
|
129 |
//! Uses API elements: Open(), Close().
|
sl@0
|
130 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
131 |
//! 2. Connect the RFs session.
|
sl@0
|
132 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
133 |
//! removable drive letter, EFullFormat, aCount as parameters.
|
sl@0
|
134 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
135 |
//! 5. Close RFs session.
|
sl@0
|
136 |
//! @SYMTestStatus Implemented
|
sl@0
|
137 |
//! @SYMTestPriority Critical
|
sl@0
|
138 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
139 |
//! @SYMTestType CIT
|
sl@0
|
140 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
141 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
142 |
CREATE_OBJECT RFormat format1
|
sl@0
|
143 |
COMMAND rfs1 new
|
sl@0
|
144 |
COMMAND rfs1 Connect
|
sl@0
|
145 |
COMMAND format1 new
|
sl@0
|
146 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0004-001-Open_command05
|
sl@0
|
147 |
COMMAND format1 Close
|
sl@0
|
148 |
COMMAND format1 ~
|
sl@0
|
149 |
COMMAND rfs1 Close
|
sl@0
|
150 |
COMMAND rfs1 ~
|
sl@0
|
151 |
END_TEST_BLOCK
|
sl@0
|
152 |
END_TESTCASE PBASE-F32-Format-PublicApi-0004
|
sl@0
|
153 |
|
sl@0
|
154 |
|
sl@0
|
155 |
START_TESTCASE PBASE-F32-Format-PublicApi-0005
|
sl@0
|
156 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0005
|
sl@0
|
157 |
//! @SYMAPI RFormat
|
sl@0
|
158 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
159 |
//! using ESpecialFormat as format mode and close it.
|
sl@0
|
160 |
//! Uses API elements: Open(), Close().
|
sl@0
|
161 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
162 |
//! 2. Connect the RFs session.
|
sl@0
|
163 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
164 |
//! removable drive letter, ESpecialFormat, aCount as parameters.
|
sl@0
|
165 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
166 |
//! 5. Close RFs session.
|
sl@0
|
167 |
//! @SYMTestStatus Implemented
|
sl@0
|
168 |
//! @SYMTestPriority Critical
|
sl@0
|
169 |
//! @SYMTestExpectedResults So we are getting -21(access denied ) for formatting a disk with invalid parameter.
|
sl@0
|
170 |
//! @SYMTestType CIT
|
sl@0
|
171 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
172 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
173 |
CREATE_OBJECT RFormat format1
|
sl@0
|
174 |
COMMAND rfs1 new
|
sl@0
|
175 |
COMMAND rfs1 Connect
|
sl@0
|
176 |
COMMAND format1 new
|
sl@0
|
177 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-1005-001-Open_command05
|
sl@0
|
178 |
COMMAND !AsyncError=-21 format1 Next PBASE-F32-Format-PublicApi-1005-001-Next_command06
|
sl@0
|
179 |
OUTSTANDING
|
sl@0
|
180 |
COMMAND format1 Close
|
sl@0
|
181 |
COMMAND format1 ~
|
sl@0
|
182 |
COMMAND rfs1 Close
|
sl@0
|
183 |
COMMAND rfs1 ~
|
sl@0
|
184 |
END_TEST_BLOCK
|
sl@0
|
185 |
END_TESTCASE PBASE-F32-Format-PublicApi-0005
|
sl@0
|
186 |
|
sl@0
|
187 |
|
sl@0
|
188 |
START_TESTCASE PBASE-F32-Format-PublicApi-0006
|
sl@0
|
189 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0006
|
sl@0
|
190 |
//! @SYMAPI RFormat
|
sl@0
|
191 |
//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo) test. Open
|
sl@0
|
192 |
//! a device and close it.
|
sl@0
|
193 |
//! Uses API elements: Open(), Close().
|
sl@0
|
194 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
195 |
//! 2. Connect the RFs session.
|
sl@0
|
196 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo) method,
|
sl@0
|
197 |
//! passing the RFs session, removable drive letter, EQuickFormat, aCount, special format information s as parameters.
|
sl@0
|
198 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
199 |
//! 5. Close RFs session.
|
sl@0
|
200 |
//! @SYMTestStatus Implemented
|
sl@0
|
201 |
//! @SYMTestPriority Critical
|
sl@0
|
202 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
203 |
//! @SYMTestType CIT
|
sl@0
|
204 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
205 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
206 |
CREATE_OBJECT RFormat format1
|
sl@0
|
207 |
COMMAND rfs1 new
|
sl@0
|
208 |
COMMAND rfs1 Connect
|
sl@0
|
209 |
COMMAND format1 new
|
sl@0
|
210 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0006-001-Open_command05
|
sl@0
|
211 |
COMMAND format1 Close
|
sl@0
|
212 |
COMMAND format1 ~
|
sl@0
|
213 |
COMMAND rfs1 Close
|
sl@0
|
214 |
COMMAND rfs1 ~
|
sl@0
|
215 |
END_TEST_BLOCK
|
sl@0
|
216 |
END_TESTCASE PBASE-F32-Format-PublicApi-0006
|
sl@0
|
217 |
|
sl@0
|
218 |
|
sl@0
|
219 |
START_TESTCASE PBASE-F32-Format-PublicApi-0007
|
sl@0
|
220 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0007
|
sl@0
|
221 |
//! @SYMAPI RFormat
|
sl@0
|
222 |
//! @SYMTestCaseDesc Function Next(TInt &aStep) test. Open a removable device, execute the next format steps and close the device.
|
sl@0
|
223 |
//! Uses API elements: Open(), Next(), Close().
|
sl@0
|
224 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
225 |
//! 2. Connect the RFs session.
|
sl@0
|
226 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
227 |
//! removable drive letter, EHighDensity, aCount as parameters.
|
sl@0
|
228 |
//! 4. Call Next(TInt &aStep) method, passing aCount as parameter and loop it until aCount reaches 0.
|
sl@0
|
229 |
//! 5. Call Close() to close the RFormat instance.
|
sl@0
|
230 |
//! 6. Close RFs session.
|
sl@0
|
231 |
//! @SYMTestStatus Implemented
|
sl@0
|
232 |
//! @SYMTestPriority Critical
|
sl@0
|
233 |
//! @SYMTestExpectedResults The Next() method call is completed returning KErrNone.
|
sl@0
|
234 |
//! @SYMTestType CIT
|
sl@0
|
235 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
236 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
237 |
CREATE_OBJECT RFormat format1
|
sl@0
|
238 |
COMMAND rfs1 new
|
sl@0
|
239 |
COMMAND rfs1 Connect
|
sl@0
|
240 |
COMMAND format1 new
|
sl@0
|
241 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0007-001-Open_command05
|
sl@0
|
242 |
COMMAND format1 Next
|
sl@0
|
243 |
COMMAND format1 Close
|
sl@0
|
244 |
COMMAND format1 ~
|
sl@0
|
245 |
COMMAND rfs1 Close
|
sl@0
|
246 |
COMMAND rfs1 ~
|
sl@0
|
247 |
END_TEST_BLOCK
|
sl@0
|
248 |
END_TESTCASE PBASE-F32-Format-PublicApi-0007
|
sl@0
|
249 |
|
sl@0
|
250 |
|
sl@0
|
251 |
START_TESTCASE PBASE-F32-Format-PublicApi-0008
|
sl@0
|
252 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0008
|
sl@0
|
253 |
//! @SYMAPI RFormat
|
sl@0
|
254 |
//! @SYMTestCaseDesc Function Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) test. Open a removable device, execute the next format
|
sl@0
|
255 |
//! steps and close the device.
|
sl@0
|
256 |
//! Uses API elements: Open(), Next(), Close().
|
sl@0
|
257 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
258 |
//! 2. Connect the RFs session.
|
sl@0
|
259 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
260 |
//! removable drive letter, EHighDensity, aCount as parameters.
|
sl@0
|
261 |
//! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
|
sl@0
|
262 |
//! activeListener -> iStatus as parameters and loop it until aCount reaches 0.
|
sl@0
|
263 |
//! 5. Call Close() to close the RFormat instance.
|
sl@0
|
264 |
//! 6. Close RFs session.
|
sl@0
|
265 |
//! @SYMTestStatus Implemented
|
sl@0
|
266 |
//! @SYMTestPriority Critical
|
sl@0
|
267 |
//! @SYMTestExpectedResults The Next() method call is completed returning KErrNone.
|
sl@0
|
268 |
//! @SYMTestType CIT
|
sl@0
|
269 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
270 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
271 |
CREATE_OBJECT RFormat format1
|
sl@0
|
272 |
COMMAND rfs1 new
|
sl@0
|
273 |
COMMAND rfs1 Connect
|
sl@0
|
274 |
COMMAND format1 new
|
sl@0
|
275 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0008-001-Open_command05
|
sl@0
|
276 |
COMMAND format1 Next PBASE-F32-Format-PublicApi-0008-001-Next_command06
|
sl@0
|
277 |
OUTSTANDING
|
sl@0
|
278 |
COMMAND format1 Close
|
sl@0
|
279 |
COMMAND format1 ~
|
sl@0
|
280 |
COMMAND rfs1 Close
|
sl@0
|
281 |
COMMAND rfs1 ~
|
sl@0
|
282 |
END_TEST_BLOCK
|
sl@0
|
283 |
END_TESTCASE PBASE-F32-Format-PublicApi-0008
|
sl@0
|
284 |
|
sl@0
|
285 |
|
sl@0
|
286 |
START_TESTCASE PBASE-F32-Format-PublicApi-0009
|
sl@0
|
287 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-0009
|
sl@0
|
288 |
//! @SYMAPI RFormat
|
sl@0
|
289 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) and Close() test. Open a removable device
|
sl@0
|
290 |
//! using EForceErase as format mode and close it.
|
sl@0
|
291 |
//! Uses API elements: Open(), Close().
|
sl@0
|
292 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
293 |
//! 2. Connect the RFs session.
|
sl@0
|
294 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
295 |
//! removable drive letter, EForceErase, aCount as parameters.
|
sl@0
|
296 |
//! 4. Call Close() to close the RFormat instance.
|
sl@0
|
297 |
//! 5. Close RFs session.
|
sl@0
|
298 |
//! @SYMTestStatus Implemented
|
sl@0
|
299 |
//! @SYMTestPriority Critical
|
sl@0
|
300 |
//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
|
sl@0
|
301 |
//! @SYMTestType CIT
|
sl@0
|
302 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
303 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
304 |
CREATE_OBJECT RFormat format1
|
sl@0
|
305 |
COMMAND rfs1 new
|
sl@0
|
306 |
COMMAND rfs1 Connect
|
sl@0
|
307 |
COMMAND format1 new
|
sl@0
|
308 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-0009-001-Open_command05
|
sl@0
|
309 |
COMMAND format1 Close
|
sl@0
|
310 |
COMMAND format1 ~
|
sl@0
|
311 |
COMMAND rfs1 Close
|
sl@0
|
312 |
COMMAND rfs1 ~
|
sl@0
|
313 |
END_TEST_BLOCK
|
sl@0
|
314 |
END_TESTCASE PBASE-F32-Format-PublicApi-0009
|
sl@0
|
315 |
|
sl@0
|
316 |
|
sl@0
|
317 |
// ************************
|
sl@0
|
318 |
// *** NEGATIVE TESTS ***
|
sl@0
|
319 |
// ************************
|
sl@0
|
320 |
|
sl@0
|
321 |
|
sl@0
|
322 |
|
sl@0
|
323 |
START_TESTCASE PBASE-F32-Format-PublicApi-1005
|
sl@0
|
324 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-1005
|
sl@0
|
325 |
//! @SYMAPI RFormat
|
sl@0
|
326 |
//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with invalid
|
sl@0
|
327 |
//! format mode value.
|
sl@0
|
328 |
//! Uses API elements: Open(), Close().
|
sl@0
|
329 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
330 |
//! 2. Connect the RFs session.
|
sl@0
|
331 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
332 |
//! removable drive letter, -1, aCount as parameters.
|
sl@0
|
333 |
//! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
|
sl@0
|
334 |
//! activeListener -> iStatus as parameters and loop it until aCount reaches 0.
|
sl@0
|
335 |
//! 5. Call Close() to close the RFormat instance.
|
sl@0
|
336 |
//! 6. Close RFs session.
|
sl@0
|
337 |
//! @SYMTestStatus Implemented
|
sl@0
|
338 |
//! @SYMTestPriority Critical
|
sl@0
|
339 |
//! @SYMTestExpectedResults The Open() method call returns error -21 (Access denied).
|
sl@0
|
340 |
//! @SYMTestType CIT
|
sl@0
|
341 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
342 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
343 |
CREATE_OBJECT RFormat format1
|
sl@0
|
344 |
COMMAND rfs1 new
|
sl@0
|
345 |
COMMAND rfs1 Connect
|
sl@0
|
346 |
COMMAND format1 new
|
sl@0
|
347 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-1005-001-Open_command05
|
sl@0
|
348 |
COMMAND !AsyncError=-21 format1 Next PBASE-F32-Format-PublicApi-1005-001-Next_command06
|
sl@0
|
349 |
OUTSTANDING
|
sl@0
|
350 |
COMMAND format1 Close
|
sl@0
|
351 |
COMMAND format1 ~
|
sl@0
|
352 |
COMMAND rfs1 Close
|
sl@0
|
353 |
COMMAND rfs1 ~
|
sl@0
|
354 |
END_TEST_BLOCK
|
sl@0
|
355 |
END_TESTCASE PBASE-F32-Format-PublicApi-1005
|
sl@0
|
356 |
|
sl@0
|
357 |
|
sl@0
|
358 |
START_TESTCASE PBASE-F32-Format-PublicApi-1009
|
sl@0
|
359 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-1009
|
sl@0
|
360 |
//! @SYMAPI RFormat
|
sl@0
|
361 |
//! @SYMTestCaseDesc Functions Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Open a removable device
|
sl@0
|
362 |
//! using EQuickFormat as format mode after opening a file on it.
|
sl@0
|
363 |
//! Uses API elements: Open(), Close().
|
sl@0
|
364 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
365 |
//! 2. Connect the RFs session.
|
sl@0
|
366 |
//! 3. Create an RFile instance.
|
sl@0
|
367 |
//! 4. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
368 |
//! removable drive letter, EQuickFormat, aCount as parameters.
|
sl@0
|
369 |
//! 5. Call Close() to close the RFormat instance.
|
sl@0
|
370 |
//! 6. Close RFile instance.
|
sl@0
|
371 |
//! 7. Close RFs session.
|
sl@0
|
372 |
//! @SYMTestStatus Implemented
|
sl@0
|
373 |
//! @SYMTestPriority Critical
|
sl@0
|
374 |
//! @SYMTestExpectedResults The Open() method call returns error -14 (KErrInUse).
|
sl@0
|
375 |
//! @SYMTestType CIT
|
sl@0
|
376 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
377 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
378 |
CREATE_OBJECT RFile file
|
sl@0
|
379 |
CREATE_OBJECT RFormat format1
|
sl@0
|
380 |
COMMAND rfs1 new
|
sl@0
|
381 |
COMMAND rfs1 Connect
|
sl@0
|
382 |
COMMAND file new
|
sl@0
|
383 |
COMMAND file Create PBASE-F32-Format-PublicApi-1009-001-Create_command05
|
sl@0
|
384 |
COMMAND format1 new
|
sl@0
|
385 |
COMMAND !Error=-14 format1 Open PBASE-F32-Format-PublicApi-1009-001-Open_command08
|
sl@0
|
386 |
COMMAND format1 Close
|
sl@0
|
387 |
COMMAND format1 ~
|
sl@0
|
388 |
COMMAND file Close
|
sl@0
|
389 |
COMMAND file ~
|
sl@0
|
390 |
COMMAND rfs1 Close
|
sl@0
|
391 |
COMMAND rfs1 ~
|
sl@0
|
392 |
END_TEST_BLOCK
|
sl@0
|
393 |
END_TESTCASE PBASE-F32-Format-PublicApi-1009
|
sl@0
|
394 |
|
sl@0
|
395 |
|
sl@0
|
396 |
START_TESTCASE PBASE-F32-Format-PublicApi-1010
|
sl@0
|
397 |
//! @SYMTestCaseID PBASE-F32-Format-PublicApi-1010
|
sl@0
|
398 |
//! @SYMAPI RFormat
|
sl@0
|
399 |
//! @SYMTestCaseDesc A test which stops the format in the middle and tries to create a RFs instance after that.
|
sl@0
|
400 |
//! Uses API elements: Open(), Next(), Close().
|
sl@0
|
401 |
//! @SYMTestActions 1. Create RFs session.
|
sl@0
|
402 |
//! 2. Connect the RFs session.
|
sl@0
|
403 |
//! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
|
sl@0
|
404 |
//! removable drive letter, EHighDensity, aCount as parameters.
|
sl@0
|
405 |
//! 4. Call Next(TPckgBuf< TInt > &aStep, TRequestStatus &aStatus) method, passing aCount,
|
sl@0
|
406 |
//! activeListener -> iStatus as parameters and loop it.
|
sl@0
|
407 |
//! 5. Call Close() to close the RFormat instance, without calling outstanding first.
|
sl@0
|
408 |
//! 6. Create an RFile instance.
|
sl@0
|
409 |
//! 7. Close RFile instance.
|
sl@0
|
410 |
//! 8. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method to format the disk for future
|
sl@0
|
411 |
//! usage, passing the RFs session, removable drive letter, EHighDensity, aCount as parameters.
|
sl@0
|
412 |
//! 9. Call Next(TInt &aStep) method, passing aCount as parameter and loop it until aCount reaches 0.
|
sl@0
|
413 |
//! 10. Call Close() to close the RFormat instance.
|
sl@0
|
414 |
//! 11. Close RFs session.
|
sl@0
|
415 |
//! @SYMTestStatus Implemented
|
sl@0
|
416 |
//! @SYMTestPriority Critical
|
sl@0
|
417 |
//! @SYMTestExpectedResults The RFs create method call will return error -20 (KErrCorrupt).
|
sl@0
|
418 |
//! @SYMTestType CIT
|
sl@0
|
419 |
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini
|
sl@0
|
420 |
CREATE_OBJECT RFs rfs1
|
sl@0
|
421 |
CREATE_OBJECT RFormat format1
|
sl@0
|
422 |
CREATE_OBJECT RFile file
|
sl@0
|
423 |
COMMAND rfs1 new
|
sl@0
|
424 |
COMMAND rfs1 Connect
|
sl@0
|
425 |
COMMAND format1 new
|
sl@0
|
426 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-1010-001-Open_command05
|
sl@0
|
427 |
COMMAND format1 Next PBASE-F32-Format-PublicApi-1010-001-Next_command06
|
sl@0
|
428 |
ASYNC_DELAY 10
|
sl@0
|
429 |
COMMAND format1 Close
|
sl@0
|
430 |
COMMAND format1 ~
|
sl@0
|
431 |
COMMAND file new
|
sl@0
|
432 |
COMMAND !Error=-20 file Create PBASE-F32-Format-PublicApi-1010-001-Create_command10
|
sl@0
|
433 |
COMMAND file Close
|
sl@0
|
434 |
COMMAND file ~
|
sl@0
|
435 |
COMMAND format1 new
|
sl@0
|
436 |
COMMAND format1 Open PBASE-F32-Format-PublicApi-1010-001-Open_command14
|
sl@0
|
437 |
COMMAND format1 Next
|
sl@0
|
438 |
COMMAND format1 Close
|
sl@0
|
439 |
COMMAND format1 ~
|
sl@0
|
440 |
COMMAND rfs1 Close
|
sl@0
|
441 |
COMMAND rfs1 ~
|
sl@0
|
442 |
END_TEST_BLOCK
|
sl@0
|
443 |
END_TESTCASE PBASE-F32-Format-PublicApi-1010
|
sl@0
|
444 |
|
sl@0
|
445 |
|