summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-30 22:56:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-30 22:56:15 (GMT)
commitb969dce6e5625dd9d9f9cc42717a1b2027fdeeb1 (patch)
treeae2f2b4b6b417831b35f14c4e12e4bcc7971b636 /test
parentc136b81140106231e471b334bc5248611cec04e6 (diff)
downloadhdf5-b969dce6e5625dd9d9f9cc42717a1b2027fdeeb1.zip
hdf5-b969dce6e5625dd9d9f9cc42717a1b2027fdeeb1.tar.gz
hdf5-b969dce6e5625dd9d9f9cc42717a1b2027fdeeb1.tar.bz2
[svn-r14224] Description:
Change H5Literate -> H5Literate_by_name and add simpler form of H5Literate, to bring this routine into alignment with the other new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test')
-rw-r--r--test/links.c28
-rw-r--r--test/titerate.c18
-rw-r--r--test/trefer.c2
3 files changed, 24 insertions, 24 deletions
diff --git a/test/links.c b/test/links.c
index ce3714f..9f648ba 100644
--- a/test/links.c
+++ b/test/links.c
@@ -7220,7 +7220,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if(H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_cb, iter_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0) TEST_ERROR
/* Verify that we visited all the links */
if(skip != max_links) TEST_ERROR
@@ -7252,7 +7252,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if(H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_cb, iter_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0) TEST_ERROR
/* Verify that we visited all the links */
if(skip != max_links) TEST_ERROR
@@ -7316,7 +7316,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if((ret = H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_cb, iter_info, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((ret = H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info)) < 0) TEST_ERROR
if(ret != CORDER_ITER_STOP) TEST_ERROR
if(iter_info->ncalled != 3) TEST_ERROR
@@ -7338,7 +7338,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
/* Check for iteration routine indicating failure */
skip = 0;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_fail_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, idx_type, order, &skip, link_iterate_fail_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -7457,7 +7457,7 @@ link_iterate(hid_t fapl)
/* Check for iteration on empty group */
/* (should be OK) */
- if(H5Literate(group_id, ".", idx_type, order, NULL, link_iterate_cb, NULL, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, idx_type, order, NULL, link_iterate_cb, NULL) < 0) TEST_ERROR
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -7477,7 +7477,7 @@ link_iterate(hid_t fapl)
/* Check for out of bound iteration on compact group */
skip = (hsize_t)u;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -7503,7 +7503,7 @@ link_iterate(hid_t fapl)
/* Check for out of bound iteration on dense group */
skip = (hsize_t)u;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", idx_type, order, &skip, link_iterate_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -7677,7 +7677,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if(H5Literate(group_id, ".", H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0) TEST_ERROR
/* Verify that we visited all the links */
if(skip != max_links) TEST_ERROR
@@ -7709,7 +7709,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if(H5Literate(group_id, ".", H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0) TEST_ERROR
/* Verify that we visited all the links */
if(skip != max_links) TEST_ERROR
@@ -7773,7 +7773,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->ncalled = 0;
iter_info->curr = order != H5_ITER_DEC ? 0 : (max_links - 1);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
- if((ret = H5Literate(group_id, ".", H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((ret = H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info)) < 0) TEST_ERROR
if(ret != CORDER_ITER_STOP) TEST_ERROR
if(iter_info->ncalled != 3) TEST_ERROR
@@ -7795,7 +7795,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
/* Check for iteration routine indicating failure */
skip = 0;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -7863,7 +7863,7 @@ link_iterate_old(hid_t fapl)
/* Check for iteration on empty group */
/* (should be OK) */
- if(H5Literate(group_id, ".", H5_INDEX_NAME, order, NULL, link_iterate_old_cb, NULL, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Literate(group_id, H5_INDEX_NAME, order, NULL, link_iterate_old_cb, NULL) < 0) TEST_ERROR
/* Create several links */
for(u = 0; u < CORDER_NLINKS; u++) {
@@ -7883,7 +7883,7 @@ link_iterate_old(hid_t fapl)
/* Check for out of bound iteration on old-style group */
skip = (hsize_t)u;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", H5_INDEX_NAME, order, &skip, link_iterate_old_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
@@ -7891,7 +7891,7 @@ link_iterate_old(hid_t fapl)
/* (should fail) */
skip = (hsize_t)0;
H5E_BEGIN_TRY {
- ret = H5Literate(group_id, ".", H5_INDEX_CRT_ORDER, order, &skip, link_iterate_old_cb, NULL, H5P_DEFAULT);
+ ret = H5Literate(group_id, H5_INDEX_CRT_ORDER, order, &skip, link_iterate_old_cb, NULL);
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
diff --git a/test/titerate.c b/test/titerate.c
index 9f93427..397e3c0 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -146,7 +146,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* Test iterating over empty group */
info.command = RET_ZERO;
idx = 0;
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
VERIFY(ret, SUCCEED, "H5Literate");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -257,35 +257,35 @@ test_iter_group(hid_t fapl, hbool_t new_format)
info.command = RET_ZERO;
idx = (hsize_t)-1;
H5E_BEGIN_TRY {
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Literate");
/* Test skipping exactly as many entries as in the group */
idx = NDATASETS + 2;
H5E_BEGIN_TRY {
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Literate");
/* Test skipping more entries than are in the group */
idx = NDATASETS + 3;
H5E_BEGIN_TRY {
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Literate");
/* Test all objects in group, when callback always returns 0 */
info.command = RET_ZERO;
idx = 0;
- if((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) > 0)
+ if((ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0)
TestErrPrintf("Group iteration function didn't return zero correctly!\n");
/* Test all objects in group, when callback always returns 1 */
/* This also tests the "restarting" ability, because the index changes */
info.command = RET_TWO;
idx = i = 0;
- while((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) > 0) {
+ while((ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) {
/* Verify return value from iterator gets propagated correctly */
VERIFY(ret, 2, "H5Literate");
@@ -310,7 +310,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* This also tests the "restarting" ability, because the index changes */
info.command = new_format ? RET_CHANGE2 : RET_CHANGE;
idx = i = 0;
- while((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) >= 0) {
+ while((ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) >= 0) {
/* Verify return value from iterator gets propagated correctly */
VERIFY(ret, 1, "H5Literate");
@@ -670,13 +670,13 @@ test_iter_group_large(hid_t fapl)
/* Iterate through the file to see members of the root group */
curr_name = &names[0];
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, NULL, liter_cb2, curr_name, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, NULL, liter_cb2, curr_name);
CHECK(ret, FAIL, "H5Literate");
for(i = 1; i < 100; i++) {
hsize_t idx = i;
curr_name = &names[i];
- ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb2, curr_name, H5P_DEFAULT);
+ ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb2, curr_name);
CHECK(ret, FAIL, "H5Literate");
} /* end for */
diff --git a/test/trefer.c b/test/trefer.c
index bef497f..e3ffd76 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1077,7 +1077,7 @@ test_reference_group(void)
CHECK(gid, FAIL, "H5Rdereference");
/* Iterate through objects in dereferenced group */
- ret = H5Literate(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, test_deref_iter_op, &count, H5P_DEFAULT);
+ ret = H5Literate(gid, H5_INDEX_NAME, H5_ITER_INC, NULL, test_deref_iter_op, &count);
CHECK(ret, FAIL, "H5Literate");
/* Various queries on the group opened */