diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-08 19:25:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-08 19:25:18 (GMT) |
commit | 95bf191857663a68e37e7bd78122fd681dbb9724 (patch) | |
tree | b313ebac701d73609deed77d65a7df3b5432f71c /test | |
parent | a89594728adfd0b3aded473b44565c5e5e5dcd18 (diff) | |
download | hdf5-95bf191857663a68e37e7bd78122fd681dbb9724.zip hdf5-95bf191857663a68e37e7bd78122fd681dbb9724.tar.gz hdf5-95bf191857663a68e37e7bd78122fd681dbb9724.tar.bz2 |
[svn-r7320] Purpose:
Refactored code
Description:
Chase changes for the 'fileno' and 'objno' fields in H5G_stat_t
Platforms tested:
h5committested
Diffstat (limited to 'test')
-rw-r--r-- | test/links.c | 14 | ||||
-rw-r--r-- | test/mount.c | 6 | ||||
-rw-r--r-- | test/mtime.c | 3 | ||||
-rw-r--r-- | test/tmisc.c | 7 | ||||
-rw-r--r-- | test/unlink.c | 3 |
5 files changed, 11 insertions, 22 deletions
diff --git a/test/links.c b/test/links.c index f84514d..5b97aff 100644 --- a/test/links.c +++ b/test/links.c @@ -264,7 +264,7 @@ cklinks(hid_t fapl) puts(" Unexpected object type should have been a dataset"); goto error; } - if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) { + if (sb1.objno!=sb2.objno) { H5_FAILED(); puts(" Hard link test failed. Link seems not to point to the "); puts(" expected file location."); @@ -278,7 +278,7 @@ cklinks(hid_t fapl) puts(" Unexpected object type should have been a dataset"); goto error; } - if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) { + if (sb1.objno!=sb2.objno) { H5_FAILED(); puts(" Soft link test failed. Link seems not to point to the "); puts(" expected file location."); @@ -398,10 +398,7 @@ ck_new_links(hid_t fapl) puts(" Unexpected object type, should have been a dataset"); goto error; } - if( sb_dset.objno[0]!=sb_hard1.objno[0] || - sb_dset.objno[1]!=sb_hard1.objno[1] || - sb_dset.objno[0]!=sb_hard2.objno[0] || - sb_dset.objno[1]!=sb_hard2.objno[1] ) { + if( sb_dset.objno!=sb_hard1.objno || sb_dset.objno!=sb_hard2.objno ) { H5_FAILED(); puts(" Hard link test failed. Link seems not to point to the "); puts(" expected file location."); @@ -419,10 +416,7 @@ ck_new_links(hid_t fapl) goto error; } - if( sb_dset.objno[0]!=sb_soft1.objno[0] || - sb_dset.objno[1]!=sb_soft1.objno[1] || - sb_dset.objno[0]!=sb_soft2.objno[0] || - sb_dset.objno[1]!=sb_soft2.objno[1] ) { + if( sb_dset.objno!=sb_soft1.objno || sb_dset.objno!=sb_soft2.objno ) { H5_FAILED(); puts(" Soft link test failed. Link seems not to point to the "); puts(" expected file location."); diff --git a/test/mount.c b/test/mount.c index 367a33b..7c71967 100644 --- a/test/mount.c +++ b/test/mount.c @@ -274,8 +274,7 @@ test_hide(hid_t fapl) * other names. This is a rather stupid test but demonstrates a point. */ if (H5Gget_objinfo(file1, "/file1", TRUE, &sb2)<0) goto error; - if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] || - sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) { + if (sb1.fileno!=sb2.fileno || sb1.objno!=sb2.objno) { H5_FAILED(); puts(" Hard link failed for hidden object."); goto error; @@ -342,8 +341,7 @@ test_assoc(hid_t fapl) * of file2. */ if (H5Gget_objinfo(file1, "/mnt1", TRUE, &sb2)<0) goto error; - if (sb1.fileno[0]!=sb2.fileno[0] || sb1.fileno[1]!=sb2.fileno[1] || - sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1]) { + if (sb1.fileno!=sb2.fileno || sb1.objno!=sb2.objno) { H5_FAILED(); puts(" Association failed."); goto error; diff --git a/test/mtime.c b/test/mtime.c index f92465a..6dfc2c9 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -97,8 +97,7 @@ main(void) if (H5Fclose(file)<0) return 1; /* Compare times from the two ways of calling H5Gget_objinfo() */ - if (sb1.objno[0]!=sb2.objno[0] || sb1.objno[1]!=sb2.objno[1] || - sb1.mtime!=sb2.mtime) { + if (sb1.objno!=sb2.objno || sb1.mtime!=sb2.mtime) { H5_FAILED(); puts(" Calling H5Gget_objinfo() with the dataset ID returned"); puts(" different values than calling it with a file and dataset"); diff --git a/test/tmisc.c b/test/tmisc.c index a0e8486..3e545c1 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -515,15 +515,14 @@ test_misc4(void) CHECK(ret, FAIL, "H5Gget_objinfo"); /* Verify that the fileno values are the same for groups from file1 */ - VERIFY(stat1.fileno[0],stat2.fileno[0],"H5Gget_objinfo"); - VERIFY(stat1.fileno[1],stat2.fileno[1],"H5Gget_objinfo"); + VERIFY(stat1.fileno,stat2.fileno,"H5Gget_objinfo"); /* Verify that the fileno values are not the same between file1 & file2 */ - if(stat1.fileno[0]==stat3.fileno[0] && stat1.fileno[1]==stat3.fileno[1]) { + if(stat1.fileno==stat3.fileno) { num_errs++; printf("Error on line %d: stat1.fileno==stat3.fileno\n",__LINE__); } /* end if */ - if(stat2.fileno[0]==stat3.fileno[0] && stat2.fileno[1]==stat3.fileno[1]) { + if(stat2.fileno==stat3.fileno) { num_errs++; printf("Error on line %d: stat1.fileno==stat3.fileno\n",__LINE__); } /* end if */ diff --git a/test/unlink.c b/test/unlink.c index 05d8831..7bfb5e9 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -453,8 +453,7 @@ check_new_move(void) puts(" Unexpected object type, should have been a group"); goto error; } - if( sb_hard1.objno[0]!=sb_hard2.objno[0] || - sb_hard1.objno[1]!=sb_hard2.objno[1] ) { + if( sb_hard1.objno!=sb_hard2.objno) { H5_FAILED(); puts(" Hard link test failed. Link seems not to point to the "); puts(" expected file location."); |