211{
212
214
215
216 if(unlink(TEST_FILE_NAME) == 0)
217 {
218
219 }
220
221 check(m_failures, ++m_testNum, "Create 32 bit vector file", 0,
222 testVector.
create(TEST_FILE_NAME, 11));
223
224 testVector.set(0,0);
225 testVector.set(1,1);
226 testVector.set(2,2);
227 testVector.set(3,3);
228 testVector.set(4,4);
229 testVector.set(5,5);
230 testVector.set(6,6);
231 testVector.set(7,7);
232 testVector.set(8,8);
233 testVector.set(9,9);
234 testVector.set(10,10);
235 check(m_failures, ++m_testNum, "Access 32 bit element 0", 0U, testVector[0]);
236 check(m_failures, ++m_testNum, "Access 32 bit element 1", 1U, testVector[1]);
237 check(m_failures, ++m_testNum, "Access 32 bit element 2", 2U, testVector[2]);
238 check(m_failures, ++m_testNum, "Access 32 bit element 3", 3U, testVector[3]);
239 check(m_failures, ++m_testNum, "Access 32 bit element 4", 4U, testVector[4]);
240 check(m_failures, ++m_testNum, "Access 32 bit element 5", 5U, testVector[5]);
241 check(m_failures, ++m_testNum, "Access 32 bit element 6", 6U, testVector[6]);
242 check(m_failures, ++m_testNum, "Access 32 bit element 7", 7U, testVector[7]);
243 check(m_failures, ++m_testNum, "Access 32 bit element 8", 8U, testVector[8]);
244 check(m_failures, ++m_testNum, "Access 32 bit element 9", 9U, testVector[9]);
245 check(m_failures, ++m_testNum, "Access 32 bit element 10", 10U, testVector[10]);
246
247
248 check(m_failures, ++m_testNum, "Close vector file", false, testVector.close());
249 check(m_failures, ++m_testNum,
"Re-open vector file",
false, testVector.
open(TEST_FILE_NAME));
250 check(m_failures, ++m_testNum, "Access 32 bit element 0", 0U, testVector[0]);
251 check(m_failures, ++m_testNum, "Access 32 bit element 1", 1U, testVector[1]);
252 check(m_failures, ++m_testNum, "Access 32 bit element 2", 2U, testVector[2]);
253 check(m_failures, ++m_testNum, "Access 32 bit element 3", 3U, testVector[3]);
254 check(m_failures, ++m_testNum, "Access 32 bit element 4", 4U, testVector[4]);
255 check(m_failures, ++m_testNum, "Access 32 bit element 5", 5U, testVector[5]);
256 check(m_failures, ++m_testNum, "Access 32 bit element 6", 6U, testVector[6]);
257 check(m_failures, ++m_testNum, "Access 32 bit element 7", 7U, testVector[7]);
258 check(m_failures, ++m_testNum, "Access 32 bit element 8", 8U, testVector[8]);
259 check(m_failures, ++m_testNum, "Access 32 bit element 9", 9U, testVector[9]);
260 check(m_failures, ++m_testNum, "Access 32 bit element 10", 10U, testVector[10]);
261
262 check(m_failures, ++m_testNum, "Close vector file", false, testVector.close());
263 check(m_failures, ++m_testNum, "Unlink vector file", 0, unlink(TEST_FILE_NAME));
264}