diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 20:11:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 20:11:52 (GMT) |
commit | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (patch) | |
tree | 30f007ff79b87a79c882d9149cdbfcb797be92e1 /test/ohdr.c | |
parent | ae1379094b71c51342772397af5caca088862a61 (diff) | |
download | hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.zip hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.gz hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.bz2 |
Convert hbool_t --> bool in test (#3494)
Diffstat (limited to 'test/ohdr.c')
-rw-r--r-- | test/ohdr.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/test/ohdr.c b/test/ohdr.c index 95a4dc3..88654c6 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -138,7 +138,7 @@ test_cont(char *filename, hid_t fapl) nchunks = hdr_info.nchunks; /* remove the 1st H5O_NAME_ID message */ - if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE) < 0) + if (H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, false) < 0) FAIL_STACK_ERROR; if (H5O_get_hdr_info(&oh_locA, &hdr_info) < 0) @@ -201,7 +201,7 @@ test_ohdr_cache(char *filename, hid_t fapl) mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION; if (H5Pget_mdc_config(my_fapl, &mdc_config) < 0) FAIL_STACK_ERROR; - mdc_config.set_initial_size = TRUE; + mdc_config.set_initial_size = true; mdc_config.initial_size = 32 * 1024; mdc_config.max_size = 64 * 1024; mdc_config.min_size = 8 * 1024; @@ -316,7 +316,7 @@ error: * bytes. For SWMR access, the read should be done all at one time. */ static herr_t -test_ohdr_swmr(hbool_t new_format) +test_ohdr_swmr(bool new_format) { hid_t fid = -1; /* File ID */ hid_t fapl = -1; /* File access property list */ @@ -652,7 +652,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) FAIL_STACK_ERROR; /* Check that the "unknown" message was _NOT_ marked */ - if (H5O__check_msg_marked_test(did, FALSE) < 0) + if (H5O__check_msg_marked_test(did, false) < 0) FAIL_STACK_ERROR; /* Close the dataset */ @@ -734,7 +734,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl) FAIL_STACK_ERROR; /* Check that the "unknown" message was marked */ - if (H5O__check_msg_marked_test(did, TRUE) < 0) + if (H5O__check_msg_marked_test(did, true) < 0) FAIL_STACK_ERROR; /* Close the dataset */ @@ -922,7 +922,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id) /* Set the 'no attrs' hint on the dcpl */ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) == H5I_INVALID_HID) TEST_ERROR; - if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) < 0) + if (H5Pset_dset_no_attrs_hint(dcpl_id, true) < 0) TEST_ERROR; /* The dataset doesn't need to contain data */ @@ -1138,14 +1138,14 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id) dcpl_minimize = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_minimize < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_minimize, true); if (ret < 0) TEST_ERROR; dcpl_dontmin = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_dontmin < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, FALSE); + ret = H5Pset_dset_no_attrs_hint(dcpl_dontmin, false); if (ret < 0) TEST_ERROR; @@ -1191,7 +1191,7 @@ test_minimized_dset_ohdr_size_comparisons(hid_t fapl_id) file_F_id = H5Fcreate(filename_b, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); if (file_F_id < 0) TEST_ERROR; - ret = H5Fset_dset_no_attrs_hint(file_F_id, TRUE); + ret = H5Fset_dset_no_attrs_hint(file_F_id, true); if (ret < 0) TEST_ERROR; @@ -1342,7 +1342,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id) dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_mx_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true); if (ret < 0) TEST_ERROR; @@ -1358,7 +1358,7 @@ test_minimized_dset_ohdr_with_filter(hid_t fapl_id) dcpl_mZ_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_mZ_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_mZ_id, true); if (ret < 0) TEST_ERROR; ret = H5Pset_chunk(dcpl_mZ_id, ndims, chunk_dim); @@ -1517,34 +1517,34 @@ test_minimized_dset_ohdr_modification_times(hid_t _fapl_id) dcpl_mx_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_mx_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_mx_id, true); if (ret < 0) TEST_ERROR; dcpl_xT_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_xT_id < 0) TEST_ERROR; - ret = H5Pset_obj_track_times(dcpl_xT_id, TRUE); + ret = H5Pset_obj_track_times(dcpl_xT_id, true); if (ret < 0) TEST_ERROR; dcpl_mT_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_mT_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_mT_id, true); if (ret < 0) TEST_ERROR; - ret = H5Pset_obj_track_times(dcpl_mT_id, TRUE); + ret = H5Pset_obj_track_times(dcpl_mT_id, true); if (ret < 0) TEST_ERROR; dcpl_mN_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_mN_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_mN_id, true); if (ret < 0) TEST_ERROR; - ret = H5Pset_obj_track_times(dcpl_mN_id, FALSE); + ret = H5Pset_obj_track_times(dcpl_mN_id, false); if (ret < 0) TEST_ERROR; @@ -1720,7 +1720,7 @@ test_minimized_dset_ohdr_fillvalue_backwards_compatability(hid_t _fapl_id) if (dcpl_id < 0) TEST_ERROR; - ret = H5Pset_dset_no_attrs_hint(dcpl_id, TRUE); + ret = H5Pset_dset_no_attrs_hint(dcpl_id, true); if (ret == FAIL) TEST_ERROR; @@ -1828,14 +1828,14 @@ main(void) hid_t file = -1; H5F_t *f = NULL; const char *env_h5_drvr; /* File driver value from environment */ - hbool_t single_file_vfd; /* Whether VFD used stores data in a single file */ + bool single_file_vfd; /* Whether VFD used stores data in a single file */ char filename[1024]; H5O_hdr_info_t hdr_info; /* Object info */ H5O_loc_t oh_loc; /* Object header locations */ H5F_libver_t low, high; /* File format bounds */ time_t time_new, ro; int i; /* Local index variable */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret; /* Generic return value */ /* Get the VFD to use */ @@ -1854,7 +1854,7 @@ main(void) /* Push API context */ if (H5CX_push() < 0) FAIL_STACK_ERROR; - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Loop through all the combinations of low/high library format bounds */ for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { @@ -2029,9 +2029,9 @@ main(void) * Delete all time messages. */ TESTING("message deletion"); - if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0) + if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0) FAIL_STACK_ERROR; - if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE) < 0) + if (H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, true) < 0) FAIL_STACK_ERROR; if (H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro)) FAIL_STACK_ERROR; @@ -2067,7 +2067,7 @@ main(void) H5E_END_TRY if (ret >= 0) TEST_ERROR; - if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0) + if (H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, true) < 0) FAIL_STACK_ERROR; PASSED(); @@ -2134,18 +2134,18 @@ main(void) if (H5FD__supports_swmr_test(env_h5_drvr)) { /* A test to exercise the re-read of the object header for SWMR access */ - if (test_ohdr_swmr(TRUE) < 0) + if (test_ohdr_swmr(true) < 0) TEST_ERROR; - if (test_ohdr_swmr(FALSE) < 0) + if (test_ohdr_swmr(false) < 0) TEST_ERROR; } else HDputs("Skipped SWMR tests for SWMR-incompatible VFD"); /* Pop API context */ - if (api_ctx_pushed && H5CX_pop(FALSE) < 0) + if (api_ctx_pushed && H5CX_pop(false) < 0) FAIL_STACK_ERROR; - api_ctx_pushed = FALSE; + api_ctx_pushed = false; HDputs("All object header tests passed."); h5_cleanup(FILENAME, fapl); @@ -2160,7 +2160,7 @@ error: H5E_END_TRY if (api_ctx_pushed) - H5CX_pop(FALSE); + H5CX_pop(false); return 1; } /* end main() */ |