diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-28 15:02:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-28 15:02:54 (GMT) |
commit | ea343ef85416b42f68f28fb1024702c6726f7eea (patch) | |
tree | d5c401bf83f7f5578df06c54f9fd9fb198732ed2 /test/stab.c | |
parent | eb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 (diff) | |
download | hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.zip hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.gz hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.bz2 |
[svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with
either H5Gopen2().
Add test for H5Gopen1().
Reformatted several pieces of code, to clean them up.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
Solaris/32 5.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'test/stab.c')
-rw-r--r-- | test/stab.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/stab.c b/test/stab.c index f8d452d..d49d3a8 100644 --- a/test/stab.c +++ b/test/stab.c @@ -117,9 +117,9 @@ test_misc(hid_t fapl, hbool_t new_format) if(H5Gclose(g3) < 0) TEST_ERROR /* Open all groups with absolute names to check for exsistence */ - if((g1 = H5Gopen(fid, "/test_1a")) < 0) TEST_ERROR - if((g2 = H5Gopen(fid, "/test_1a/sub_1")) < 0) TEST_ERROR - if((g3 = H5Gopen(fid, "/test_1b")) < 0) TEST_ERROR + if((g1 = H5Gopen2(fid, "/test_1a", H5P_DEFAULT)) < 0) TEST_ERROR + if((g2 = H5Gopen2(fid, "/test_1a/sub_1", H5P_DEFAULT)) < 0) TEST_ERROR + if((g3 = H5Gopen2(fid, "/test_1b", H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gget_comment(g3, "././.", sizeof comment, comment) < 0) TEST_ERROR if(HDstrcmp(comment, "hello world")) { H5_FAILED(); @@ -204,8 +204,8 @@ test_long(hid_t fapl, hbool_t new_format) if(H5Gclose(g2) < 0) TEST_ERROR /* Open groups */ - if((g1 = H5Gopen(fid, name1)) < 0) TEST_ERROR - if((g2 = H5Gopen(fid, name2)) < 0) TEST_ERROR + if((g1 = H5Gopen2(fid, name1, H5P_DEFAULT)) < 0) TEST_ERROR + if((g2 = H5Gopen2(fid, name2, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(g1) < 0) TEST_ERROR if(H5Gclose(g2) < 0) TEST_ERROR @@ -708,7 +708,7 @@ read_old(hid_t fapl2) if((fid = H5Fopen(filename2, H5F_ACC_RDWR, fapl2)) < 0) TEST_ERROR /* Attempt to open "old" group */ - if((gid = H5Gopen(fid, "old")) < 0) TEST_ERROR + if((gid = H5Gopen2(fid, "old", H5P_DEFAULT)) < 0) TEST_ERROR /* Check on old group's status */ if(H5G_is_empty_test(gid) == FALSE) TEST_ERROR @@ -929,7 +929,7 @@ gcpl_on_root(hid_t fapl2) if(H5Pclose(fcpl) < 0) TEST_ERROR /* Open the root group */ - if((gid = H5Gopen(fid, "/")) < 0) TEST_ERROR + if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) TEST_ERROR /* Query the group creation properties */ if((gcpl = H5Gget_create_plist(gid)) < 0) TEST_ERROR @@ -963,7 +963,7 @@ gcpl_on_root(hid_t fapl2) if(H5Gclose(gid2) < 0) TEST_ERROR /* Open the middle group */ - if((gid2 = H5Gopen(fid, GCPL_ON_ROOT_MIDDLE_GROUP)) < 0) TEST_ERROR + if((gid2 = H5Gopen2(fid, GCPL_ON_ROOT_MIDDLE_GROUP, H5P_DEFAULT)) < 0) TEST_ERROR /* Query the group creation properties */ if((gcpl = H5Gget_create_plist(gid2)) < 0) TEST_ERROR @@ -1058,6 +1058,12 @@ old_api(hid_t fapl, const char *driver) /* Close group */ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR + /* Re-open group */ + if((gid = H5Gopen1(fid, OLD_API_GROUP)) < 0) FAIL_STACK_ERROR + + /* Close group */ + if(H5Gclose(gid) < 0) FAIL_STACK_ERROR + /* Close file */ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR @@ -1074,6 +1080,7 @@ old_api(hid_t fapl, const char *driver) #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ fapl = fapl; + driver = driver; SKIPPED(); puts(" Deprecated API symbols not enabled"); |