diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-29 21:01:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-29 21:01:20 (GMT) |
commit | 73df82dcdf83544c8a07b572568e9a3a3f0f9f77 (patch) | |
tree | b56fa674812962644fcc0cadf05e073d2685c6bf /test/tskiplist.c | |
parent | 51ed85b2775eba3923fb9b0c7ee887ff9284cc22 (diff) | |
download | hdf5-73df82dcdf83544c8a07b572568e9a3a3f0f9f77.zip hdf5-73df82dcdf83544c8a07b572568e9a3a3f0f9f77.tar.gz hdf5-73df82dcdf83544c8a07b572568e9a3a3f0f9f77.tar.bz2 |
[svn-r9598] Purpose:
New internal feature
Description:
Add a "release" routine to the skip lists, which releases all the nodes
in the skip list, but keeps the skip list active.
Platforms tested:
FreeBSD 4.10 (sleipnir)
Linux 2.4 (verbena)
Too minor to require h5committest
Diffstat (limited to 'test/tskiplist.c')
-rw-r--r-- | test/tskiplist.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/tskiplist.c b/test/tskiplist.c index cf88daf..dfd73a9 100644 --- a/test/tskiplist.c +++ b/test/tskiplist.c @@ -235,6 +235,28 @@ test_skiplist_insert_many(void) VERIFY(*found_item,rand_num[u],"H5SL_search"); } /* end for */ + /* Release all the items from the list */ + ret=H5SL_release(slist); + CHECK(ret, FAIL, "H5SL_release"); + + /* Check that the skip list has no elements */ + num=H5SL_count(slist); + VERIFY(num, 0, "H5SL_count"); + + /* Insert many objects into the skip list */ + for(u=0; u<NUM_ELEMS; u++) { + ret=H5SL_insert(slist,&rand_num[u],&rand_num[u]); + CHECK(ret, FAIL, "H5SL_insert"); + } /* end for */ + + /* Check that the skip list has correct # of elements */ + num=H5SL_count(slist); + VERIFY(num, NUM_ELEMS, "H5SL_count"); + + /* Release all the items from the list */ + ret=H5SL_release(slist); + CHECK(ret, FAIL, "H5SL_release"); + /* Close the skip list */ ret=H5SL_close(slist); CHECK(ret, FAIL, "H5SL_close"); |