diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-01-16 21:29:34 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-01-16 21:29:34 (GMT) |
commit | a92c735c9b57049e8c4037d3490f7e10f8eef4d6 (patch) | |
tree | 74da25151de6d1e32329dfcd62e17c863e2e3de1 /c++/test | |
parent | 024f7ba09250110c19b070c9699cfbc0f9dc2b96 (diff) | |
download | hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.zip hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.gz hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.bz2 |
Squashed commit of the token_refactoring branch:
Diffstat (limited to 'c++/test')
-rw-r--r-- | c++/test/dsets.cpp | 26 | ||||
-rw-r--r-- | c++/test/tattr.cpp | 4 | ||||
-rw-r--r-- | c++/test/tfile.cpp | 14 | ||||
-rw-r--r-- | c++/test/titerate.cpp | 12 | ||||
-rw-r--r-- | c++/test/tlinks.cpp | 4 | ||||
-rw-r--r-- | c++/test/tobject.cpp | 2 | ||||
-rw-r--r-- | c++/test/trefer.cpp | 2 |
7 files changed, 32 insertions, 32 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 14f1bd4..fc29307 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -1116,9 +1116,9 @@ static herr_t test_types(H5File& file) /*------------------------------------------------------------------------- - * Function: test_getObjinfo + * Function: test_getNativeObjinfo * - * Purpose Tests getObjinfo() + * Purpose Tests getNativeObjinfo() * * Return Success: 0 * Failure: -1 @@ -1126,7 +1126,7 @@ static herr_t test_types(H5File& file) * July, 2018 *------------------------------------------------------------------------- */ -static herr_t test_getinfo(H5File& file) +static herr_t test_getnativeinfo(H5File& file) { SUBTEST("Getting object information"); @@ -1142,18 +1142,18 @@ static herr_t test_getinfo(H5File& file) DataSet dataset(file.openDataSet(DSET_CHUNKED_NAME)); // Get dataset header info - H5O_info_t oinfo; - HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getObjinfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.nchunks, 1, "DataSet::getObjinfo", __LINE__, __FILE__); + H5O_native_info_t ninfo; + HDmemset(&ninfo, 0, sizeof(ninfo)); + dataset.getNativeObjinfo(ninfo, H5O_NATIVE_INFO_HDR); + verify_val(ninfo.hdr.nchunks, 1, "DataSet::getNativeObjinfo", __LINE__, __FILE__); dataset.close(); // Open the dataset we created above and then close it. This is one // way to open an existing dataset for accessing. dataset = file.openDataSet(DSET_DEFAULT_NAME); - HDmemset(&oinfo, 0, sizeof(oinfo)); - dataset.getObjinfo(oinfo, H5O_INFO_ALL); - verify_val(oinfo.hdr.nchunks, 1, "DataSet::getObjinfo", __LINE__, __FILE__); + HDmemset(&ninfo, 0, sizeof(ninfo)); + dataset.getNativeObjinfo(ninfo, H5O_NATIVE_INFO_ALL); + verify_val(ninfo.hdr.nchunks, 1, "DataSet::getNativeObjinfo", __LINE__, __FILE__); dataset.close(); PASSED(); @@ -1169,10 +1169,10 @@ static herr_t test_getinfo(H5File& file) // catch all other exceptions catch (Exception& E) { - issue_fail_msg("test_getinfo", __LINE__, __FILE__); + issue_fail_msg("test_getnativeinfo", __LINE__, __FILE__); return -1; } -} // test_getinfo +} // test_getnativeinfo /*------------------------------------------------------------------------- @@ -1408,7 +1408,7 @@ void test_dset() nerrors += test_create(file) < 0 ? 1:0; nerrors += test_simple_io(file) < 0 ? 1:0; - nerrors += test_getinfo(file) < 0 ? 1:0; + nerrors += test_getnativeinfo(file) < 0 ? 1:0; nerrors += test_tconv(file) < 0 ? 1:0; nerrors += test_compression(file) < 0 ? 1:0; nerrors += test_nbit_compression(file) < 0 ? 1:0; diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 4734755..9485ec6 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -519,7 +519,7 @@ static void test_attr_basic_read() verify_val(num_attrs, 3, "DataSet::getNumAttrs", __LINE__, __FILE__); // Verify the correct number of attributes another way - H5O_info_t oinfo; + H5O_info2_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); dataset.getObjinfo(oinfo, H5O_INFO_NUM_ATTRS); verify_val(oinfo.num_attrs, 3, "DataSet::getObjinfo", __LINE__, __FILE__); @@ -670,7 +670,7 @@ static void test_attr_compound_read() verify_val(num_attrs, 1, "DataSet::getNumAttrs", __LINE__, __FILE__); // Verify the correct number of attributes another way - H5O_info_t oinfo; + H5O_info2_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); dataset.getObjinfo(oinfo, H5O_INFO_NUM_ATTRS); verify_val(oinfo.num_attrs, 1, "DataSet::getObjinfo", __LINE__, __FILE__); diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 055cf23..a0231a6 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -716,10 +716,10 @@ static void test_libver_bounds_real( 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.getObjinfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.version, oh_vers_create, "H5File::getObjinfo", __LINE__, __FILE__); + H5O_native_info_t ninfo; + HDmemset(&ninfo, 0, sizeof(ninfo)); + file.getNativeObjinfo(ninfo, H5O_NATIVE_INFO_HDR); + verify_val(ninfo.hdr.version, oh_vers_create, "H5File::getNativeObjinfo", __LINE__, __FILE__); /* * Reopen the file and make sure the root group still has the correct @@ -744,9 +744,9 @@ static void test_libver_bounds_real( verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__); // Verify object header version another way - HDmemset(&oinfo, 0, sizeof(oinfo)); - group.getObjinfo(oinfo, H5O_INFO_HDR); - verify_val(oinfo.hdr.version, oh_vers_mod, "Group::getObjinfo", __LINE__, __FILE__); + HDmemset(&ninfo, 0, sizeof(ninfo)); + group.getNativeObjinfo(ninfo, H5O_NATIVE_INFO_HDR); + verify_val(ninfo.hdr.version, oh_vers_mod, "Group::getNativeObjinfo", __LINE__, __FILE__); group.close(); // close "/G1" diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp index e77ebcc..c689087 100644 --- a/c++/test/titerate.cpp +++ b/c++/test/titerate.cpp @@ -96,7 +96,7 @@ int iter_strcmp(const void *s1, const void *s2) * Purpose Custom link iteration callback routine *------------------------------------------------------------------------- */ -static herr_t liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_info, void *op_data) +static herr_t liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link_info, void *op_data) { iter_info *info = (iter_info *)op_data; static int count = 0; @@ -158,7 +158,7 @@ static void test_iter_group(FileAccPropList& fapl) /* Test iterating over empty group */ info.command = RET_ZERO; idx = 0; - ret = H5Literate(file.getId(), H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); + ret = H5Literate2(file.getId(), H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info); verify_val(ret, SUCCEED, "H5Literate", __LINE__, __FILE__); DataType datatype(PredType::NATIVE_INT); @@ -207,7 +207,7 @@ static void test_iter_group(FileAccPropList& fapl) H5std_string obj_name; for (i = 0; i < nobjs; i++) { - //H5O_info_t oinfo; /* Object info */ + //H5O_info2_t oinfo; /* Object info */ obj_name = root_group.getObjnameByIdx(i); //ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT); @@ -287,7 +287,7 @@ static void test_iter_group(FileAccPropList& fapl) /* 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)) > 0) + if((ret = H5Literate2(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 */ @@ -295,7 +295,7 @@ static void test_iter_group(FileAccPropList& fapl) info.command = RET_TWO; i = 0; idx = 0; - while((ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) { + while((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) > 0) { /* Verify return value from iterator gets propagated correctly */ verify_val(ret, 2, "H5Literate", __LINE__, __FILE__); @@ -321,7 +321,7 @@ static void test_iter_group(FileAccPropList& fapl) info.command = new_format ? RET_CHANGE2 : RET_CHANGE; i = 0; idx = 0; - while((ret = H5Literate(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) >= 0) { + while((ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info)) >= 0) { /* Verify return value from iterator gets propagated correctly */ verify_val(ret, 1, "H5Literate", __LINE__, __FILE__); diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 491cd6a..1bdd442 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -190,7 +190,7 @@ const H5std_string GROUP2NAME("Second_group"); static void test_lcpl(hid_t fapl_id, hbool_t new_format) { - H5L_info_t linfo; + H5L_info2_t linfo; char filename[1024]; hsize_t dims[2]; @@ -604,7 +604,7 @@ const int RANK = 2; const int DIM1 = 2; // Operator function -static int visit_obj_cb(H5Object& obj, const H5std_string name, const H5O_info_t *oinfo, void *_op_data) +static int visit_obj_cb(H5Object& obj, const H5std_string name, const H5O_info2_t *oinfo, void *_op_data) { ovisit_ud_t *op_data = static_cast <ovisit_ud_t *>(_op_data); diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp index 232ece2..fd0f5ce 100644 --- a/c++/test/tobject.cpp +++ b/c++/test/tobject.cpp @@ -542,7 +542,7 @@ const H5std_string GROUP1NAME("group1"); const H5std_string GROUP2NAME("group2"); static void test_getobjectinfo_same_file() { - H5O_info_t oinfo1, oinfo2; /* Object info structs */ + H5O_info2_t oinfo1, oinfo2; /* Object info structs */ // Output message about test being performed SUBTEST("Group::getObjinfo"); diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index 562b127..8a6fb51 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -482,7 +482,7 @@ static void test_reference_group() verify_val(fname, FILE1, "H5Group::getFileName",__LINE__,__FILE__); // Check object type using Group::getObjinfo() - H5O_info_t oinfo; + H5O_info2_t oinfo; HDmemset(&oinfo, 0, sizeof(oinfo)); group.getObjinfo(".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, oinfo); verify_val(oinfo.type, H5O_TYPE_DATASET, "Group::getObjinfo",__LINE__,__FILE__); |