diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-21 19:57:29 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-08-21 19:57:29 (GMT) |
commit | 32bf83f1cf00df5079d8a5e2f16422a28d1fa53d (patch) | |
tree | 482f580ff8909e18ebeba05807b2a219de6813b3 /test/vds.c | |
parent | 1821b64d49521335c4b364d8504e57782120419b (diff) | |
download | hdf5-32bf83f1cf00df5079d8a5e2f16422a28d1fa53d.zip hdf5-32bf83f1cf00df5079d8a5e2f16422a28d1fa53d.tar.gz hdf5-32bf83f1cf00df5079d8a5e2f16422a28d1fa53d.tar.bz2 |
[svn-r27546] Add tests for H5O__dset_bh_info (H5Oget_info) and unlimited selections in a
region reference.
Tested: ummon
Diffstat (limited to 'test/vds.c')
-rw-r--r-- | test/vds.c | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -327,11 +327,12 @@ error: /* Helper function to get DCPL for examination depending on config */ static int test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, - hid_t *ex_dcpl, hid_t vspace, char *filename) + hid_t *ex_dcpl, hid_t vspace, char *filename, hsize_t exp_meta_size) { hid_t file = -1; /* File */ hid_t dset = -1; /* Virtual dataset */ void *plist_buf = NULL; /* Serialized property list buffer */ + H5O_info_t oinfo; /* Object info struct */ htri_t tri_ret; HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); @@ -379,6 +380,24 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, if(HADDR_UNDEF != H5Dget_offset(dset)) TEST_ERROR + /* Test H5Oget_info returns correct metadata size */ + if(H5Oget_info(dset, &oinfo) < 0) + TEST_ERROR + if(oinfo.meta_size.obj.index_size != (hsize_t)0) + TEST_ERROR + if(config == TEST_API_REOPEN_FILE) { + if(oinfo.meta_size.obj.heap_size != exp_meta_size) { printf("%llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size); + TEST_ERROR } + } /* end if */ + else + if((oinfo.meta_size.obj.heap_size != exp_meta_size) + && (oinfo.meta_size.obj.heap_size != (hsize_t)0)) + TEST_ERROR + if(oinfo.meta_size.attr.index_size != (hsize_t)0) + TEST_ERROR + if(oinfo.meta_size.attr.index_size != (hsize_t)0) + TEST_ERROR + /* Close dataset */ if(H5Dclose(dset) < 0) TEST_ERROR @@ -531,7 +550,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)68) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -602,7 +621,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)212) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -676,7 +695,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -745,7 +764,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -878,7 +897,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1009,7 +1028,7 @@ test_api(test_api_config_t config, hid_t fapl) } /* end if */ /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)696) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ @@ -1063,7 +1082,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR /* Get examination DCPL */ - if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0) + if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)0) < 0) TEST_ERROR /* Test H5Pget_virtual_count */ |