diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 18:49:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 18:49:37 (GMT) |
commit | d24f5d5223731d507b51d112ba564d764d6d6c18 (patch) | |
tree | d6b198ab73404830c4a259ef03c8e318b5e029c4 /testpar/API/t_file.c | |
parent | 6dd9cb199c0ecf0882fecf17475f25f1af210f95 (diff) | |
download | hdf5-d24f5d5223731d507b51d112ba564d764d6d6c18.zip hdf5-d24f5d5223731d507b51d112ba564d764d6d6c18.tar.gz hdf5-d24f5d5223731d507b51d112ba564d764d6d6c18.tar.bz2 |
Convert hbool_t --> bool in testpar (#3495)
Diffstat (limited to 'testpar/API/t_file.c')
-rw-r--r-- | testpar/API/t_file.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/testpar/API/t_file.c b/testpar/API/t_file.c index c906c78..7fd9c57 100644 --- a/testpar/API/t_file.c +++ b/testpar/API/t_file.c @@ -143,7 +143,7 @@ test_page_buffer_access(void) H5F_t *f = NULL; herr_t ret; /* generic return value */ const char *filename; - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -174,7 +174,7 @@ test_page_buffer_access(void) VRFY((file_id < 0), "H5Fcreate failed"); /* disable collective metadata writes for page buffering to work */ - ret = H5Pset_coll_metadata_write(fapl, FALSE); + ret = H5Pset_coll_metadata_write(fapl, false); VRFY((ret >= 0), ""); ret = create_file(filename, fcpl, fapl, H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED); @@ -204,7 +204,7 @@ test_page_buffer_access(void) ret = H5Pset_page_buffer_size(fapl_self, sizeof(int) * 1000, 0, 0); VRFY((ret == 0), ""); /* collective metadata writes do not work with page buffering */ - ret = H5Pset_coll_metadata_write(fapl_self, FALSE); + ret = H5Pset_coll_metadata_write(fapl_self, false); VRFY((ret >= 0), ""); file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_self); @@ -213,7 +213,7 @@ test_page_buffer_access(void) /* Push API context */ ret = H5CX_push(); VRFY((ret == 0), "H5CX_push()"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get a pointer to the internal file object */ f = (H5F_t *)H5I_object(file_id); @@ -302,9 +302,9 @@ test_page_buffer_access(void) /* Pop API context */ if (api_ctx_pushed) { - ret = H5CX_pop(FALSE); + ret = H5CX_pop(false); VRFY((ret == 0), "H5CX_pop()"); - api_ctx_pushed = FALSE; + api_ctx_pushed = false; } } @@ -314,7 +314,7 @@ test_page_buffer_access(void) ret = H5Pset_page_buffer_size(fapl, sizeof(int) * 1000, 0, 0); VRFY((ret == 0), ""); /* collective metadata writes do not work with page buffering */ - ret = H5Pset_coll_metadata_write(fapl, FALSE); + ret = H5Pset_coll_metadata_write(fapl, false); VRFY((ret >= 0), ""); file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl); @@ -323,7 +323,7 @@ test_page_buffer_access(void) /* Push API context */ ret = H5CX_push(); VRFY((ret == 0), "H5CX_push()"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; /* Get a pointer to the internal file object */ f = (H5F_t *)H5I_object(file_id); @@ -436,9 +436,9 @@ test_page_buffer_access(void) /* Pop API context */ if (api_ctx_pushed) { - ret = H5CX_pop(FALSE); + ret = H5CX_pop(false); VRFY((ret == 0), "H5CX_pop()"); - api_ctx_pushed = FALSE; + api_ctx_pushed = false; } free(data); @@ -463,7 +463,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str H5F_t *f = NULL; H5C_t *cache_ptr = NULL; H5AC_cache_config_t config; - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret; file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl); @@ -475,7 +475,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str /* Push API context */ ret = H5CX_push(); VRFY((ret == 0), "H5CX_push()"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; f = (H5F_t *)H5I_object(file_id); VRFY((f != NULL), ""); @@ -483,7 +483,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str cache_ptr = f->shared->cache; VRFY((cache_ptr->magic == H5C__H5C_T_MAGIC), ""); - cache_ptr->ignore_tags = TRUE; + cache_ptr->ignore_tags = true; H5C_stats__reset(cache_ptr); config.version = H5AC__CURR_CACHE_CONFIG_VERSION; @@ -592,9 +592,9 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str /* Pop API context */ if (api_ctx_pushed) { - ret = H5CX_pop(FALSE); + ret = H5CX_pop(false); VRFY((ret == 0), "H5CX_pop()"); - api_ctx_pushed = FALSE; + api_ctx_pushed = false; } MPI_Barrier(MPI_COMM_WORLD); @@ -620,7 +620,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t H5F_t *f = NULL; H5C_t *cache_ptr = NULL; H5AC_cache_config_t config; - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + bool api_ctx_pushed = false; /* Whether API context pushed */ herr_t ret; config.version = H5AC__CURR_CACHE_CONFIG_VERSION; @@ -639,7 +639,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t /* Push API context */ ret = H5CX_push(); VRFY((ret == 0), "H5CX_push()"); - api_ctx_pushed = TRUE; + api_ctx_pushed = true; ret = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((ret == 0), ""); @@ -728,7 +728,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t while (entry_ptr != NULL) { assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - assert(entry_ptr->is_dirty == FALSE); + assert(entry_ptr->is_dirty == false); if (!entry_ptr->is_pinned && !entry_ptr->is_protected) { ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0); @@ -756,9 +756,9 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t /* Pop API context */ if (api_ctx_pushed) { - ret = H5CX_pop(FALSE); + ret = H5CX_pop(false); VRFY((ret == 0), "H5CX_pop()"); - api_ctx_pushed = FALSE; + api_ctx_pushed = false; } free(data_array); @@ -778,7 +778,7 @@ test_file_properties(void) hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ hid_t fapl_id = H5I_INVALID_HID; /* File access plist */ hid_t fapl_copy_id = H5I_INVALID_HID; /* File access plist */ - hbool_t is_coll; + bool is_coll; htri_t are_equal; const char *filename; MPI_Comm comm = MPI_COMM_WORLD; @@ -847,7 +847,7 @@ test_file_properties(void) fapl_copy_id = H5Pcopy(fapl_id); VRFY((fapl_copy_id != H5I_INVALID_HID), "H5Pcopy"); are_equal = H5Pequal(fapl_id, fapl_copy_id); - VRFY((TRUE == are_equal), "H5Pequal"); + VRFY((true == are_equal), "H5Pequal"); /* Add a property to the copy and ensure it's different now */ mpi_ret = MPI_Info_set(info, "hdf_info_prop2", "abc"); @@ -855,7 +855,7 @@ test_file_properties(void) ret = H5Pset_mpi_params(fapl_copy_id, comm, info); VRFY((ret >= 0), "H5Pset_mpi_params succeeded"); are_equal = H5Pequal(fapl_id, fapl_copy_id); - VRFY((FALSE == are_equal), "H5Pequal"); + VRFY((false == are_equal), "H5Pequal"); /* Add a property with the same key but a different value to the original * and ensure they are still different. @@ -865,7 +865,7 @@ test_file_properties(void) ret = H5Pset_mpi_params(fapl_id, comm, info); VRFY((ret >= 0), "H5Pset_mpi_params succeeded"); are_equal = H5Pequal(fapl_id, fapl_copy_id); - VRFY((FALSE == are_equal), "H5Pequal"); + VRFY((false == are_equal), "H5Pequal"); /* Set the second property in the original to the same * value as the copy and ensure they are the same now. @@ -875,7 +875,7 @@ test_file_properties(void) ret = H5Pset_mpi_params(fapl_id, comm, info); VRFY((ret >= 0), "H5Pset_mpi_params succeeded"); are_equal = H5Pequal(fapl_id, fapl_copy_id); - VRFY((TRUE == are_equal), "H5Pequal"); + VRFY((true == are_equal), "H5Pequal"); /* create the file */ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); @@ -886,12 +886,12 @@ test_file_properties(void) /* Collective metadata writes */ ret = H5Pget_coll_metadata_write(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded"); - VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes"); + VRFY((is_coll == false), "Incorrect property setting for coll metadata writes"); /* Collective metadata read API calling requirement */ ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded"); - VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement"); + VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement"); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); @@ -907,12 +907,12 @@ test_file_properties(void) /* Collective metadata writes */ ret = H5Pget_coll_metadata_write(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded"); - VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata writes"); + VRFY((is_coll == false), "Incorrect property setting for coll metadata writes"); /* Collective metadata read API calling requirement */ ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded"); - VRFY((is_coll == FALSE), "Incorrect property setting for coll metadata API calls requirement"); + VRFY((is_coll == false), "Incorrect property setting for coll metadata API calls requirement"); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); @@ -921,10 +921,10 @@ test_file_properties(void) ret = H5Pset_fapl_mpio(fapl_id, comm, info); VRFY((ret >= 0), "H5Pset_fapl_mpio failed"); /* Collective metadata writes */ - ret = H5Pset_coll_metadata_write(fapl_id, TRUE); + ret = H5Pset_coll_metadata_write(fapl_id, true); VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded"); /* Collective metadata read API calling requirement */ - ret = H5Pset_all_coll_metadata_ops(fapl_id, TRUE); + ret = H5Pset_all_coll_metadata_ops(fapl_id, true); VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded"); fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id); VRFY((fid != H5I_INVALID_HID), "H5Fcreate succeeded"); @@ -934,12 +934,12 @@ test_file_properties(void) /* Collective metadata writes */ ret = H5Pget_coll_metadata_write(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded"); - VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes"); + VRFY((is_coll == true), "Incorrect property setting for coll metadata writes"); /* Collective metadata read API calling requirement */ ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded"); - VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement"); + VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement"); /* close fapl and retrieve it from file */ ret = H5Pclose(fapl_id); @@ -954,12 +954,12 @@ test_file_properties(void) /* Collective metadata writes */ ret = H5Pget_coll_metadata_write(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_coll_metadata_write succeeded"); - VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata writes"); + VRFY((is_coll == true), "Incorrect property setting for coll metadata writes"); /* Collective metadata read API calling requirement */ ret = H5Pget_all_coll_metadata_ops(fapl_id, &is_coll); VRFY((ret >= 0), "H5Pget_all_coll_metadata_ops succeeded"); - VRFY((is_coll == TRUE), "Incorrect property setting for coll metadata API calls requirement"); + VRFY((is_coll == true), "Incorrect property setting for coll metadata API calls requirement"); /* close file */ ret = H5Fclose(fid); @@ -1022,7 +1022,7 @@ test_delete(void) /* Verify that the file is an HDF5 file */ is_hdf5 = H5Fis_accessible(filename, fapl_id); - VRFY((TRUE == is_hdf5), "H5Fis_accessible"); + VRFY((true == is_hdf5), "H5Fis_accessible"); /* Delete the file */ ret = H5Fdelete(filename, fapl_id); |