diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-29 21:01:24 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-29 21:01:24 (GMT) |
commit | d5b0db14a939d07aa220216b1698c9ddc9cc7430 (patch) | |
tree | 05528092819fe67012dba14723595703309e092c /test | |
parent | 3eea418b507d9a561606c658eba5c6b0158f520d (diff) | |
download | hdf5-d5b0db14a939d07aa220216b1698c9ddc9cc7430.zip hdf5-d5b0db14a939d07aa220216b1698c9ddc9cc7430.tar.gz hdf5-d5b0db14a939d07aa220216b1698c9ddc9cc7430.tar.bz2 |
[svn-r9599] 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')
-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"); |