summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-25 20:11:06 (GMT)
committerGitHub <noreply@github.com>2021-08-25 20:11:06 (GMT)
commit6b1adb2ec97a529854613e091270f5b3cb37bc22 (patch)
tree2779f78bcfad97dcaeff4ef8560ee0c27ef850a1 /test/links.c
parent9424fa2d5e9cab7e187f9e1efe0bc7ba50f691ca (diff)
downloadhdf5-6b1adb2ec97a529854613e091270f5b3cb37bc22.zip
hdf5-6b1adb2ec97a529854613e091270f5b3cb37bc22.tar.gz
hdf5-6b1adb2ec97a529854613e091270f5b3cb37bc22.tar.bz2
Merge test changes from develop (#959)
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/links.c b/test/links.c
index 4600ebf..2de1fca 100644
--- a/test/links.c
+++ b/test/links.c
@@ -631,6 +631,8 @@ cklinks(hid_t fapl, hbool_t new_format)
if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
+ //! [H5Otoken_cmp_snip]
+
/* Hard link */
if (H5Oget_info_by_name3(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
@@ -641,6 +643,9 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR
} /* end if */
+
+ //! [H5Otoken_cmp_snip]
+
if (H5Otoken_cmp(file, &oinfo1.token, &oinfo2.token, &token_cmp) < 0)
FAIL_STACK_ERROR
if (token_cmp) {
@@ -15938,12 +15943,16 @@ obj_visit(hid_t fapl, hbool_t new_format)
if ((fid = build_visit_file(fapl)) < 0)
TEST_ERROR
+ //! [H5Ovisit3_snip]
+
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
if (H5Ovisit3(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0)
FAIL_STACK_ERROR
+ //! [H5Ovisit3_snip]
+
/* Visit all the objects reachable from the root group (with group ID) */
if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
@@ -16015,6 +16024,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format)
if ((fid = build_visit_file(fapl)) < 0)
TEST_ERROR
+ //! [H5Ovisit_by_name3_snip]
+
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
@@ -16022,6 +16033,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format)
H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
+ //! [H5Ovisit_by_name3_snip]
+
/* Visit all the objects reachable from the root group (with group ID) */
if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
@@ -16670,7 +16683,7 @@ obj_exists(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
/* Hard links */
- /* Verify that H5Oexists_by_name() fails for non-existent link in root group */
+ /* Verify that H5Oexists_by_name() returns false for non-existent link in root group */
H5E_BEGIN_TRY
{
status = H5Oexists_by_name(fid, "foo", H5P_DEFAULT);
@@ -16689,7 +16702,7 @@ obj_exists(hid_t fapl, hbool_t new_format)
if (TRUE != H5Oexists_by_name(fid, "group", H5P_DEFAULT))
TEST_ERROR
- /* Verify that H5Oexists_by_name() fails for non-existent link in non-root group */
+ /* Verify that H5Oexists_by_name() returns false for non-existent object in non-root group */
H5E_BEGIN_TRY
{
status = H5Oexists_by_name(fid, "group/foo", H5P_DEFAULT);