summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
commit3bed8703631cbcffb215ccd82235fcc293e14218 (patch)
treebf56b0bcd4f41986f17138059f6349df78f0c059 /test/links.c
parent3eb8c81b8046d282ced9c2d94e7132058243013e (diff)
downloadhdf5-3bed8703631cbcffb215ccd82235fcc293e14218.zip
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.gz
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.bz2
[svn-r14136] Description:
Move H5Gget_num_objs() and several minor macros, etc. to deprecated symbols section, replacing it with H5Gget_info(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/links.c b/test/links.c
index 96aa255..fb6fdb6 100644
--- a/test/links.c
+++ b/test/links.c
@@ -1476,6 +1476,7 @@ test_compat(hid_t fapl, hbool_t new_format)
hid_t group1_id = -1;
hid_t group2_id = -1;
H5G_stat_t sb_hard1, sb_hard2, sb_soft1;
+ hsize_t num_objs; /* Number of objects in a group */
char filename[1024];
char linkval[1024];
@@ -1503,6 +1504,12 @@ test_compat(hid_t fapl, hbool_t new_format)
if(H5Glink2(file_id, "group1", H5G_LINK_HARD, group2_id, "link_to_group1") < 0) FAIL_STACK_ERROR
if(H5Glink2(file_id, "link_to_group1", H5G_LINK_SOFT, H5G_SAME_LOC, "group2/soft_link_to_group1") < 0) FAIL_STACK_ERROR
+ /* Test getting the number of objects in a group */
+ if(H5Gget_num_objs(file_id, &num_objs) < 0) FAIL_STACK_ERROR
+ if(num_objs != 2) TEST_ERROR
+ if(H5Gget_num_objs(group1_id, &num_objs) < 0) FAIL_STACK_ERROR
+ if(num_objs != 1) TEST_ERROR
+
/* Test that H5Glink created hard links properly */
if(H5Gget_objinfo(file_id, "/group2", TRUE, &sb_hard1) < 0) FAIL_STACK_ERROR
if(H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR
@@ -1556,7 +1563,7 @@ test_compat(hid_t fapl, hbool_t new_format)
if(H5Gopen2(file_id, "moved_group1/moved_group2", H5P_DEFAULT) >=0) TEST_ERROR
} H5E_END_TRY;
- if(H5Fclose(file_id) < 0) TEST_ERROR
+ if(H5Fclose(file_id) < 0) FAIL_STACK_ERROR
PASSED();
return 0;