summaryrefslogtreecommitdiffstats
path: root/test/theap.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/theap.c')
-rw-r--r--test/theap.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/theap.c b/test/theap.c
index 3c23025..7b2fadb 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -88,11 +88,11 @@ test_heap_init(void)
/* Allocate arrays */
rand_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(rand_num, NULL, "HDmalloc");
+ CHECK_PTR(rand_num, "HDmalloc");
inc_sort_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(inc_sort_num, NULL, "HDmalloc");
+ CHECK_PTR(inc_sort_num, "HDmalloc");
dec_sort_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(dec_sort_num, NULL, "HDmalloc");
+ CHECK_PTR(dec_sort_num, "HDmalloc");
/* Create randomized set of numbers */
curr_time = HDtime(NULL);
@@ -127,7 +127,7 @@ test_heap_create(void)
/* Try creating a maximum Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Try closing the heap */
ret=H5HP_close(heap);
@@ -135,7 +135,7 @@ test_heap_create(void)
/* Try creating a minimum Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Try closing the heap */
ret=H5HP_close(heap);
@@ -163,7 +163,7 @@ test_heap_insert_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -237,7 +237,7 @@ test_heap_insert_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -325,7 +325,7 @@ test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem, i
/* Create a Heap */
heap=H5HP_create(heap_type);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -405,7 +405,7 @@ test_heap_remove_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -434,19 +434,19 @@ test_heap_remove_min(void)
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 5, "H5HP_remove");
- VERIFY(ptr, &obj2, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj2, "H5HP_remove");
/* Remove second maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 10, "H5HP_remove");
- VERIFY(ptr, &obj1, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj1, "H5HP_remove");
/* Remove third maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 20, "H5HP_remove");
- VERIFY(ptr, &obj3, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj3, "H5HP_remove");
/* Try removing an object from an empty heap */
ret=H5HP_remove(heap,&val,&ptr);
@@ -479,7 +479,7 @@ test_heap_remove_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -508,19 +508,19 @@ test_heap_remove_max(void)
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 20, "H5HP_remove");
- VERIFY(ptr, &obj3, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj3, "H5HP_remove");
/* Remove second maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 10, "H5HP_remove");
- VERIFY(ptr, &obj1, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj1, "H5HP_remove");
/* Remove third maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 5, "H5HP_remove");
- VERIFY(ptr, &obj2, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj2, "H5HP_remove");
/* Try removing an object from an empty heap */
ret=H5HP_remove(heap,&val,&ptr);
@@ -567,7 +567,7 @@ static void test_heap_remove_many_core(H5HP_type_t heap_type, test_obj *arr, siz
/* Create a Heap */
heap=H5HP_create(heap_type);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -714,7 +714,7 @@ test_heap_change_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -788,7 +788,7 @@ test_heap_change_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -880,7 +880,7 @@ test_heap_incdec_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -955,7 +955,7 @@ test_heap_incdec_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);