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-19 04:02:16 (GMT)
commit2b1709f6ff9a8fcfc1e6d5128b24501d927e21a7 (patch)
tree995755018d754f98b7ecf4c53452d7aaebba34e1 /test/mtime.c
parentdbb0ccc31db5d6a2b87ce859380043a0e7e66bd7 (diff)
downloadhdf5-2b1709f6ff9a8fcfc1e6d5128b24501d927e21a7.zip
hdf5-2b1709f6ff9a8fcfc1e6d5128b24501d927e21a7.tar.gz
hdf5-2b1709f6ff9a8fcfc1e6d5128b24501d927e21a7.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();