diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-07-17 06:09:45 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-07-17 06:09:45 (GMT) |
commit | 14bf28780aa850928c0ffeae838f6dd6140bd615 (patch) | |
tree | 13515fcdfea82e30d1d3009359d973b3bfe9548c /c++/test/tfile.cpp | |
parent | fe916ada370f33b48b3c39dbf9e3ff73df00fdb7 (diff) | |
download | hdf5-14bf28780aa850928c0ffeae838f6dd6140bd615.zip hdf5-14bf28780aa850928c0ffeae838f6dd6140bd615.tar.gz hdf5-14bf28780aa850928c0ffeae838f6dd6140bd615.tar.bz2 |
Fixed HDFFV-10458 partially
Description:
Added wrappers for H5Oget_info2 and H5Oget_info_by_name2.
// Returns information about an HDF5 object.
void getInfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC)
// Returns information about an HDF5 object, given its name.
void getInfo(const char* name, H5O_info_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
void getInfo(const H5std_string& name, H5O_info_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
Platforms tested:
Linux/64 (jelly)
Linux/32 (jam)
Darwin (osx1010test)
Diffstat (limited to 'c++/test/tfile.cpp')
-rw-r--r-- | c++/test/tfile.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index c82ab42..dd32364 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -657,8 +657,15 @@ static void test_libver_bounds_real( unsigned obj_version = file.childObjVersion(ROOTGROUP); verify_val(obj_version, oh_vers_create, "H5File::childObjVersion", __LINE__, __FILE__); + // Verify object header version another way + H5O_info_t oinfo; + HDmemset(&oinfo, 0, sizeof(oinfo)); + file.getInfo(oinfo, H5O_INFO_HDR); + verify_val(oinfo.hdr.version, oh_vers_create, "H5File::getInfo", __LINE__, __FILE__); + /* - * Reopen the file and make sure the root group still has the correct version + * Reopen the file and make sure the root group still has the correct + * version */ file.close(); @@ -678,6 +685,11 @@ static void test_libver_bounds_real( obj_version = group.objVersion(); verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__); + // Verify object header version another way + HDmemset(&oinfo, 0, sizeof(oinfo)); + group.getInfo(oinfo, H5O_INFO_HDR); + verify_val(oinfo.hdr.version, oh_vers_mod, "Group::getInfo", __LINE__, __FILE__); + group.close(); // close "/G1" /* |