summaryrefslogtreecommitdiffstats
path: root/test/tskiplist.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-10-18 21:37:31 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-10-18 21:37:31 (GMT)
commit8f0218e3f54c4491407ef1eb9c57ae925bacf515 (patch)
tree8831cd2f4215881dc727e47881dc213b76354995 /test/tskiplist.c
parentb02f6c2171986e08df00cbf47361a94a0833d72e (diff)
downloadhdf5-8f0218e3f54c4491407ef1eb9c57ae925bacf515.zip
hdf5-8f0218e3f54c4491407ef1eb9c57ae925bacf515.tar.gz
hdf5-8f0218e3f54c4491407ef1eb9c57ae925bacf515.tar.bz2
[svn-r21605] Back out r21604 (wait for code freeze to be lifted)
Diffstat (limited to 'test/tskiplist.c')
-rw-r--r--test/tskiplist.c284
1 files changed, 74 insertions, 210 deletions
diff --git a/test/tskiplist.c b/test/tskiplist.c
index 8966e39..8510db2 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -121,7 +121,7 @@ test_skiplist_create(void)
MESSAGE(6, ("Testing Creating & Closing Skip Lists\n"));
/* Try creating a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Try closing the skip list */
@@ -151,7 +151,7 @@ test_skiplist_insert(void)
MESSAGE(7, ("Testing Insertion Into Skip List\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -160,7 +160,7 @@ test_skiplist_insert(void)
/* Try searching for item in empty skip list */
key=37;
- found_item=(int *)H5SL_search(slist,&key);
+ found_item=H5SL_search(slist,&key);
VERIFY(found_item, NULL, "H5SL_search");
/* Insert an object into the skip list */
@@ -173,13 +173,13 @@ test_skiplist_insert(void)
VERIFY(num, 1, "H5SL_count");
/* Search for the item just inserted */
- found_item=(int *)H5SL_search(slist,&key);
+ found_item=H5SL_search(slist,&key);
CHECK(found_item, NULL, "H5SL_search");
VERIFY(*found_item,item,"H5SL_search");
/* Search for an item not in list */
search_key=37;
- found_item=(int *)H5SL_search(slist,&search_key);
+ found_item=H5SL_search(slist,&search_key);
VERIFY(found_item, NULL, "H5SL_search");
/* Attempt to insert duplicate key (should fail) */
@@ -212,7 +212,7 @@ test_skiplist_insert_many(void)
MESSAGE(7, ("Testing Insertion of Many Items Into Skip List\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -231,7 +231,7 @@ test_skiplist_insert_many(void)
/* Search for all objects in the skip list */
for(u=0; u<NUM_ELEMS; u++) {
- found_item=(int *)H5SL_search(slist,&rand_num[u]);
+ found_item=H5SL_search(slist,&rand_num[u]);
CHECK(found_item, NULL, "H5SL_search");
VERIFY(*found_item,rand_num[u],"H5SL_search");
} /* end for */
@@ -286,7 +286,7 @@ test_skiplist_remove(void)
MESSAGE(7, ("Testing Removal From Skip List\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -295,7 +295,7 @@ test_skiplist_remove(void)
/* Try removing an item in empty skip list */
search_key=37;
- found_item=(int *)H5SL_remove(slist,&search_key);
+ found_item=H5SL_remove(slist,&search_key);
VERIFY(found_item, NULL, "H5SL_remove");
/* Insert three objects into the skip list */
@@ -317,17 +317,17 @@ test_skiplist_remove(void)
/* Try removing items from skip list */
search_key=key1;
- found_item=(int *)H5SL_remove(slist,&search_key);
+ found_item=H5SL_remove(slist,&search_key);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(found_item, &key1, "H5SL_remove");
search_key=key2;
- found_item=(int *)H5SL_remove(slist,&search_key);
+ found_item=H5SL_remove(slist,&search_key);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(found_item, &key2, "H5SL_remove");
search_key=key3;
- found_item=(int *)H5SL_remove(slist,&search_key);
+ found_item=H5SL_remove(slist,&search_key);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(found_item, &key3, "H5SL_remove");
@@ -337,7 +337,7 @@ test_skiplist_remove(void)
/* Try removing items from empty skip list (after its been worked on) */
search_key=key1;
- found_item=(int *)H5SL_remove(slist,&search_key);
+ found_item=H5SL_remove(slist,&search_key);
VERIFY(found_item, NULL, "H5SL_remove");
/* Close the skip list */
@@ -365,7 +365,7 @@ test_skiplist_remove_many(void)
MESSAGE(7, ("Testing Removal of Many Items From Skip List\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -384,7 +384,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list (in random order) */
for(u=0; u<NUM_ELEMS; u++) {
- found_item=(int *)H5SL_remove(slist,&rand_num[u]);
+ found_item=H5SL_remove(slist,&rand_num[u]);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(*found_item,rand_num[u],"H5SL_remove");
} /* end for */
@@ -407,7 +407,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list */
for(u=0; u<NUM_ELEMS; u++) {
- found_item=(int *)H5SL_remove(slist,&sort_rand_num[u]);
+ found_item=H5SL_remove(slist,&sort_rand_num[u]);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(*found_item,sort_rand_num[u],"H5SL_remove");
} /* end for */
@@ -430,7 +430,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list */
for(u=0; u<NUM_ELEMS; u++) {
- found_item=(int *)H5SL_remove(slist,&rev_sort_rand_num[u]);
+ found_item=H5SL_remove(slist,&rev_sort_rand_num[u]);
CHECK(found_item, NULL, "H5SL_remove");
VERIFY(*found_item,rev_sort_rand_num[u],"H5SL_remove");
} /* end for */
@@ -465,13 +465,13 @@ test_skiplist_firstnext(void)
MESSAGE(7, ("Testing Iterating Over Skip List With First/Next\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
-
VERIFY(num, 0, "H5SL_count");
+
/* Check that the list appears empty */
node=H5SL_first(slist);
VERIFY(node, NULL, "H5SL_first");
@@ -491,7 +491,7 @@ test_skiplist_firstnext(void)
CHECK(node, NULL, "H5SL_first");
u=0;
while(node!=NULL) {
- found_item=(int *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sort_rand_num[u],"H5SL_next");
u++;
node=H5SL_next(node);
@@ -558,7 +558,7 @@ test_skiplist_string(void)
MESSAGE(7, ("Testing Skip List With String Keys\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_STR, NULL);
+ slist = H5SL_create(H5SL_TYPE_STR);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -579,7 +579,7 @@ test_skiplist_string(void)
node=H5SL_first(slist);
u=0;
while(node!=NULL) {
- found_item=(string_node *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(found_item->i, hashed_data[u].i, "H5SL_next");
u++;
node=H5SL_next(node);
@@ -620,7 +620,7 @@ test_skiplist_iterate(void)
MESSAGE(7, ("Testing Iterating Over Skip List\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -670,7 +670,7 @@ test_skiplist_hsize(void)
MESSAGE(7, ("Testing Skip List With hsize_t Keys\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_HSIZE, NULL);
+ slist = H5SL_create(H5SL_TYPE_HSIZE);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -691,7 +691,7 @@ test_skiplist_hsize(void)
node=H5SL_first(slist);
u=0;
while(node!=NULL) {
- found_item=(hsize_t *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sorted_data[u],"H5SL_next");
u++;
node=H5SL_next(node);
@@ -725,7 +725,7 @@ test_skiplist_unsigned(void)
MESSAGE(7, ("Testing Skip List With unsigned Keys\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -746,7 +746,7 @@ test_skiplist_unsigned(void)
node=H5SL_first(slist);
u=0;
while(node!=NULL) {
- found_item=(unsigned *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sorted_data[u],"H5SL_next");
u++;
node=H5SL_next(node);
@@ -760,140 +760,6 @@ test_skiplist_unsigned(void)
/****************************************************************
**
-** test_skiplist_obj(): Test H5SL (skip list) code.
-** Tests using H5_obj_t's for keys in skip lists.
-**
-****************************************************************/
-static void
-test_skiplist_obj(void)
-{
- H5SL_t *slist; /* Skip list created */
- H5SL_node_t *node; /* Skip list node */
- size_t num; /* Number of elements in skip list */
- size_t u; /* Local index variable */
- H5_obj_t data[10]={ {10, 12}, {20, 12}, {10, 32}, {10, 11}, {50, 1}, {8, 12}, {31, 12}, {20, 11}, {31, 11}, {8, 32} };
- H5_obj_t sorted_data[10]={ {8, 12}, {8, 32}, {10, 11}, {10, 12}, {10, 32}, {20, 11}, {20, 12}, {31, 11}, {31, 12}, {50, 1} };
- H5_obj_t *found_item; /* Item found in skip list */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(7, ("Testing Skip List With H5_obj_t Keys\n"));
-
- /* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_OBJ, NULL);
- CHECK(slist, NULL, "H5SL_create");
-
- /* Check that the skip list has no elements */
- num=H5SL_count(slist);
- VERIFY(num, 0, "H5SL_count");
-
- /* Insert objects into the skip list */
- for(u=0; u<10; u++) {
- ret=H5SL_insert(slist,&data[u],&data[u]);
- CHECK(ret, FAIL, "H5SL_insert");
- } /* end for */
-
- /* Check that the skip list has correct # of elements */
- num=H5SL_count(slist);
- VERIFY(num, 10, "H5SL_count");
-
- /* Iterate over all the nodes in the skip list */
- node=H5SL_first(slist);
- u=0;
- while(node!=NULL) {
- found_item=(H5_obj_t *)H5SL_item(node);
- VERIFY(found_item->fileno,sorted_data[u].fileno,"H5SL_next");
- VERIFY(found_item->addr,sorted_data[u].addr,"H5SL_next");
- u++;
- node=H5SL_next(node);
- } /* end while */
-
- /* Close the skip list */
- ret=H5SL_close(slist);
- CHECK(ret, FAIL, "H5SL_close");
-
-} /* end test_skiplist_obj() */
-
-/****************************************************************
-**
-** test_skiplist_generic(): Test H5SL (skip list) code.
-** Tests using generic keys in skip lists. Define
-** structure for keys, and define comparison using
-** key.a-key.b.
-**
-****************************************************************/
-typedef struct generic_t {
- unsigned a;
- unsigned b;
-} generic_t;
-
-static int
-test_skiplist_generic_cmp(const void *_key1, const void *_key2)
-{
- const generic_t *key1 = (const generic_t *)_key1;
- const generic_t *key2 = (const generic_t *)_key2;
- long long result = (long long)(key1->a) - (long long)(key1->b) - (long long)(key2->a) + (long long)(key2->b);
-
- if(result < 0)
- return -1;
- else if(result > 0)
- return 1;
- else
- return 0;
-} /* end test_skiplist_generic_cmp */
-
-static void
-test_skiplist_generic(void)
-{
- H5SL_t *slist; /* Skip list created */
- H5SL_node_t *node; /* Skip list node */
- size_t num; /* Number of elements in skip list */
- size_t u; /* Local index variable */
- generic_t data[10]={ {10, 1}, {20, 13}, {15, 32}, {5, 2}, {50, 37}, {30, 100}, {31, 38}, {32, 34}, {80, 32}, {90, 0} };
- generic_t sorted_data[10]={ {30, 100}, {15, 32}, {31, 38}, {32, 34}, {5, 2}, {20, 13}, {10, 1}, {50, 37}, {80, 32}, {90, 0} };
- generic_t *found_item; /* Item found in skip list */
- herr_t ret; /* Generic return value */
-
- /* Output message about test being performed */
- MESSAGE(7, ("Testing Skip List With generic Keys\n"));
-
- /* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_GENERIC, test_skiplist_generic_cmp);
- CHECK(slist, NULL, "H5SL_create");
-
- /* Check that the skip list has no elements */
- num=H5SL_count(slist);
- VERIFY(num, 0, "H5SL_count");
-
- /* Insert objects into the skip list */
- for(u=0; u<10; u++) {
- ret=H5SL_insert(slist,&data[u],&data[u]);
- CHECK(ret, FAIL, "H5SL_insert");
- } /* end for */
-
- /* Check that the skip list has correct # of elements */
- num=H5SL_count(slist);
- VERIFY(num, 10, "H5SL_count");
-
- /* Iterate over all the nodes in the skip list */
- node=H5SL_first(slist);
- u=0;
- while(node!=NULL) {
- found_item=(generic_t *)H5SL_item(node);
- VERIFY(found_item->a,sorted_data[u].a,"H5SL_next");
- VERIFY(found_item->b,sorted_data[u].b,"H5SL_next");
- u++;
- node=H5SL_next(node);
- } /* end while */
-
- /* Close the skip list */
- ret=H5SL_close(slist);
- CHECK(ret, FAIL, "H5SL_close");
-
-} /* end test_skiplist_generic() */
-
-/****************************************************************
-**
** test_skiplist_lastprev(): Test H5SL (skip list) code.
** Tests iterating over nodes in skip list with last/prev calls.
**
@@ -912,7 +778,7 @@ test_skiplist_lastprev(void)
MESSAGE(7, ("Testing Iterating Over Skip List With Last/Prev\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Check that the skip list has no elements */
@@ -938,7 +804,7 @@ test_skiplist_lastprev(void)
CHECK(node, NULL, "H5SL_last");
u=NUM_ELEMS-1;
while(node!=NULL) {
- found_item=(int *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sort_rand_num[u],"H5SL_prev");
u--;
node=H5SL_prev(node);
@@ -980,7 +846,7 @@ test_skiplist_find(void)
MESSAGE(7, ("Testing Skip List 'Find' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -997,7 +863,7 @@ test_skiplist_find(void)
/* Iterate over the rest of the nodes in the skip list */
u=4;
while(node!=NULL) {
- found_item=(unsigned *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sorted_data[u],"H5SL_next");
u++;
node=H5SL_next(node);
@@ -1036,7 +902,7 @@ test_skiplist_add(void)
MESSAGE(7, ("Testing Skip List 'Add' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1057,7 +923,7 @@ test_skiplist_add(void)
/* Iterate over the rest of the nodes in the skip list */
u=2;
while(node!=NULL) {
- found_item=(unsigned *)H5SL_item(node);
+ found_item=H5SL_item(node);
VERIFY(*found_item,sorted_data[u],"H5SL_item");
u++;
node=H5SL_next(node);
@@ -1098,7 +964,7 @@ test_skiplist_destroy(void)
MESSAGE(7, ("Testing Skip List 'Destroy' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1134,7 +1000,7 @@ test_skiplist_free(void)
MESSAGE(7, ("Testing Skip List 'Free' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1190,7 +1056,7 @@ test_skiplist_less(void)
MESSAGE(7, ("Testing Skip List 'Less' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1201,30 +1067,30 @@ test_skiplist_less(void)
/* Check for exact match of items in various positions */
find_item=20;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,find_item,"H5SL_less");
find_item=90;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,find_item,"H5SL_less");
find_item=5;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,find_item,"H5SL_less");
/* Find item less than a missing key, in various positions */
find_item=19;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,15,"H5SL_less");
find_item=89;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,80,"H5SL_less");
find_item=100;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,90,"H5SL_less");
find_item=9;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(*found_item,5,"H5SL_less");
find_item=4;
- found_item=(unsigned *)H5SL_less(slist,&find_item);
+ found_item=H5SL_less(slist,&find_item);
VERIFY(found_item,NULL,"H5SL_less");
/* Close the skip list */
@@ -1254,7 +1120,7 @@ test_skiplist_greater(void)
MESSAGE(7, ("Testing Skip List 'Greater' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1265,30 +1131,30 @@ test_skiplist_greater(void)
/* Check for exact match of items in various positions */
find_item = 20;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, find_item, "H5SL_greater");
find_item = 90;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, find_item, "H5SL_greater");
find_item = 5;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, find_item, "H5SL_greater");
/* Find item greater than a missing key, in various positions */
find_item = 19;
- found_item = (unsigned *)H5SL_greater(slist,&find_item);
+ found_item = H5SL_greater(slist,&find_item);
VERIFY(*found_item, 20, "H5SL_greater");
find_item = 89;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, 90, "H5SL_greater");
find_item = 100;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(found_item, NULL, "H5SL_greater");
find_item = 6;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, 10, "H5SL_greater");
find_item = 4;
- found_item = (unsigned *)H5SL_greater(slist, &find_item);
+ found_item = H5SL_greater(slist, &find_item);
VERIFY(*found_item, 5, "H5SL_greater");
/* Close the skip list */
@@ -1319,7 +1185,7 @@ test_skiplist_below(void)
MESSAGE(7, ("Testing Skip List 'Below' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1332,42 +1198,42 @@ test_skiplist_below(void)
find_item = 20;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
find_item = 90;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
find_item = 5;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
/* Find item less than a missing key, in various positions */
find_item = 19;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 15, "H5SL_below");
find_item = 89;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 80, "H5SL_below");
find_item = 100;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 90, "H5SL_below");
find_item = 9;
node = H5SL_below(slist, &find_item);
CHECK(node, NULL, "H5SL_below");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 5, "H5SL_below");
find_item = 4;
- node = (H5SL_node_t *)H5SL_less(slist, &find_item);
+ node = H5SL_less(slist, &find_item);
VERIFY(node, NULL, "H5SL_below");
/* Close the skip list */
@@ -1398,7 +1264,7 @@ test_skiplist_above(void)
MESSAGE(7, ("Testing Skip List 'Above' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1411,29 +1277,29 @@ test_skiplist_above(void)
find_item = 20;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
find_item = 90;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
find_item = 5;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
/* Find item greater than a missing key, in various positions */
find_item = 19;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 20, "H5SL_above");
find_item = 89;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 90, "H5SL_above");
find_item = 100;
node = H5SL_above(slist, &find_item);
@@ -1441,12 +1307,12 @@ test_skiplist_above(void)
find_item = 6;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 10, "H5SL_above");
find_item = 4;
node = H5SL_above(slist, &find_item);
CHECK(node, NULL, "H5SL_above");
- found_item = (unsigned *)H5SL_item(node);
+ found_item = H5SL_item(node);
VERIFY(*found_item, 5, "H5SL_above");
/* Close the skip list */
@@ -1475,7 +1341,7 @@ test_skiplist_remove_first(void)
MESSAGE(7, ("Testing Skip List 'Remove First' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
+ slist = H5SL_create(H5SL_TYPE_UNSIGNED);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1486,12 +1352,12 @@ test_skiplist_remove_first(void)
/* Remove objects from the skip list */
for(u = 0; u < 10; u++) {
- found_item = (unsigned *)H5SL_remove_first(slist);
+ found_item = H5SL_remove_first(slist);
VERIFY(*found_item, sorted_data[u], "H5SL_remove_first");
} /* end for */
/* Check for removing object from empty list */
- found_item = (unsigned *)H5SL_remove_first(slist);
+ found_item = H5SL_remove_first(slist);
VERIFY(found_item, NULL, "H5SL_remove_first");
/* Close the skip list */
@@ -1519,7 +1385,7 @@ test_skiplist_remove_first_many(void)
MESSAGE(7, ("Testing Skip List 'Remove First' Operation\n"));
/* Create a skip list */
- slist = H5SL_create(H5SL_TYPE_INT, NULL);
+ slist = H5SL_create(H5SL_TYPE_INT);
CHECK(slist, NULL, "H5SL_create");
/* Insert objects into the skip list */
@@ -1570,8 +1436,6 @@ test_skiplist(void)
test_skiplist_iterate(); /* Test iteration over skip list nodes with callback */
test_skiplist_hsize(); /* Test skip list hsize_t keys */
test_skiplist_unsigned(); /* Test skip list unsigned keys */
- test_skiplist_obj(); /* Test skip list H5_obj_t keys */
- test_skiplist_generic(); /* Test skip list generic keys */
test_skiplist_lastprev(); /* Test iteration over skip list nodes with last/prev */
test_skiplist_find(); /* Test 'find' operation */
test_skiplist_add(); /* Test 'add' operation */