summaryrefslogtreecommitdiffstats
path: root/test/mtime.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
commita92c735c9b57049e8c4037d3490f7e10f8eef4d6 (patch)
tree74da25151de6d1e32329dfcd62e17c863e2e3de1 /test/mtime.c
parent024f7ba09250110c19b070c9699cfbc0f9dc2b96 (diff)
downloadhdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.zip
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.gz
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.bz2
Squashed commit of the token_refactoring branch:
Diffstat (limited to 'test/mtime.c')
-rw-r--r--test/mtime.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/mtime.c b/test/mtime.c
index 06f576b..81a20db 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -60,9 +60,10 @@ main(void)
hsize_t size[1] = {2};
time_t now;
struct tm *tm;
- H5O_info_t oi1, oi2;
+ H5O_info2_t oi1, oi2;
signed char buf1[32], buf2[32];
char filename[1024];
+ int token_cmp;
h5_reset();
fapl = h5_fileaccess();
@@ -88,14 +89,15 @@ main(void)
*/
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR;
- if(H5Oget_info_by_name2(file, "dset", &oi1, H5O_INFO_BASIC|H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR;
+ if(H5Oget_info_by_name3(file, "dset", &oi1, H5O_INFO_BASIC|H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR;
if((dset = H5Dopen2(file, "dset", H5P_DEFAULT)) < 0) TEST_ERROR;
- if(H5Oget_info2(dset, &oi2, H5O_INFO_BASIC|H5O_INFO_TIME) < 0) TEST_ERROR;
+ if(H5Oget_info3(dset, &oi2, H5O_INFO_BASIC|H5O_INFO_TIME) < 0) TEST_ERROR;
+ if(H5Otoken_cmp(file, &oi1.token, &oi2.token, &token_cmp) < 0)TEST_ERROR;
if(H5Dclose(dset) < 0) TEST_ERROR;
if(H5Fclose(file) < 0) TEST_ERROR;
- /* Compare addresses & times from the two ways of calling H5Oget_info() */
- if(oi1.addr != oi2.addr || oi1.ctime != oi2.ctime) {
+ /* Compare object tokens & times from the two ways of calling H5Oget_info() */
+ if(token_cmp || oi1.ctime != oi2.ctime) {
H5_FAILED();
HDputs(" Calling H5Oget_info() with the dataset ID returned");
HDputs(" different values than calling it with a file and dataset");
@@ -132,7 +134,7 @@ main(void)
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
- if(H5Oget_info_by_name2(file, "/Dataset1", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name3(file, "/Dataset1", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0)
TEST_ERROR;
if(oi1.ctime != MTIME1) {
H5_FAILED();
@@ -162,7 +164,7 @@ main(void)
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
if(file >= 0){
- if(H5Oget_info_by_name2(file, "/Dataset1", &oi2, H5O_INFO_TIME, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name3(file, "/Dataset1", &oi2, H5O_INFO_TIME, H5P_DEFAULT) < 0)
TEST_ERROR;
if(oi2.ctime != MTIME2) {
H5_FAILED();