diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-10 18:35:25 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-10 18:35:25 (GMT) |
commit | bb356fd6d19a796bfab4642bed8fdc75b036638a (patch) | |
tree | 8381da471541fe181854407be1461059d5447b42 /test/tattr.c | |
parent | a42a1b15ef2cfd47cc696acf0487c35e07ecdcd3 (diff) | |
download | hdf5-bb356fd6d19a796bfab4642bed8fdc75b036638a.zip hdf5-bb356fd6d19a796bfab4642bed8fdc75b036638a.tar.gz hdf5-bb356fd6d19a796bfab4642bed8fdc75b036638a.tar.bz2 |
[svn-r13489] Description:
Make certain to use the later version of the object header format if
creation order is tracked on attributes.
Tested on:
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'test/tattr.c')
-rw-r--r-- | test/tattr.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/test/tattr.c b/test/tattr.c index cf8f5d4..897b713 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -4339,8 +4339,10 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Set attribute creation order tracking & indexing for object */ - ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); - CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + if(new_format == TRUE) { + ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); + CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + } /* end if */ /* Create datasets */ dset1 = H5Dcreate(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, dcpl); @@ -4577,8 +4579,10 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Set attribute creation order tracking & indexing for object */ - ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); - CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + if(new_format == TRUE) { + ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); + CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + } /* end if */ /* Create datasets */ dset1 = H5Dcreate(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, dcpl); @@ -5382,8 +5386,10 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Set attribute creation order tracking & indexing for object */ - ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); - CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + if(new_format == TRUE) { + ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); + CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + } /* end if */ /* Create datasets */ dset1 = H5Dcreate(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, dcpl); @@ -5706,8 +5712,10 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Set attribute creation order tracking & indexing for object */ - ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); - CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + if(new_format == TRUE) { + ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); + CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + } /* end if */ /* Create datasets */ dset1 = H5Dcreate(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, dcpl); @@ -5988,8 +5996,10 @@ test_attr_open(hbool_t new_format, hid_t fcpl, hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Set attribute creation order tracking & indexing for object */ - ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); - CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + if(new_format == TRUE) { + ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0))); + CHECK(ret, FAIL, "H5Pset_attr_creation_order"); + } /* end if */ /* Create datasets */ dset1 = H5Dcreate(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, dcpl); |