summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_test_util.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-05 20:11:52 (GMT)
committerGitHub <noreply@github.com>2023-09-05 20:11:52 (GMT)
commit920869796031ed4ee9c1fbea8aaccda3592a88b3 (patch)
tree30f007ff79b87a79c882d9149cdbfcb797be92e1 /test/API/H5_api_test_util.c
parentae1379094b71c51342772397af5caca088862a61 (diff)
downloadhdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.zip
hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.gz
hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.bz2
Convert hbool_t --> bool in test (#3494)
Diffstat (limited to 'test/API/H5_api_test_util.c')
-rw-r--r--test/API/H5_api_test_util.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index 916f2ca..83ac272 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -76,15 +76,15 @@
#define COMPACT_SPACE_MAX_DIM_SIZE 4
#define COMPACT_SPACE_MAX_DIMS 3
-typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, hbool_t is_compact);
+typedef hid_t (*generate_datatype_func)(H5T_class_t parent_class, bool is_compact);
-static hid_t generate_random_datatype_integer(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_float(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_string(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_compound(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_reference(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_enum(H5T_class_t parent_class, hbool_t is_compact);
-static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is_compact);
+static hid_t generate_random_datatype_integer(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_float(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_string(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_compound(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_reference(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_enum(H5T_class_t parent_class, bool is_compact);
+static hid_t generate_random_datatype_array(H5T_class_t parent_class, bool is_compact);
/*
* Helper function to generate a random HDF5 datatype in order to thoroughly
@@ -93,7 +93,7 @@ static hid_t generate_random_datatype_array(H5T_class_t parent_class, hbool_t is
* called with H5T_NO_CLASS for the parent_class parameter.
*/
hid_t
-generate_random_datatype(H5T_class_t parent_class, hbool_t is_compact)
+generate_random_datatype(H5T_class_t parent_class, bool is_compact)
{
generate_datatype_func gen_func;
static int depth = 0;
@@ -211,7 +211,7 @@ done:
}
static hid_t
-generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -288,7 +288,7 @@ done:
}
static hid_t
-generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t type_to_copy = H5I_INVALID_HID;
hid_t datatype = H5I_INVALID_HID;
@@ -330,7 +330,7 @@ done:
}
static hid_t
-generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -387,7 +387,7 @@ done:
}
static hid_t
-generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
size_t num_members = 0;
size_t next_offset = 0;
@@ -455,7 +455,7 @@ done:
}
static hid_t
-generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
hid_t datatype = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
@@ -490,7 +490,7 @@ done:
}
static hid_t
-generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H5_ATTR_UNUSED is_compact)
+generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_ATTR_UNUSED is_compact)
{
size_t num_members = 0;
hid_t datatype = H5I_INVALID_HID;
@@ -510,9 +510,9 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
}
for (size_t i = 0; i < num_members; i++) {
- hbool_t unique;
- char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
- int enum_val;
+ bool unique;
+ char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
+ int enum_val;
HDsnprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
@@ -520,10 +520,10 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H
enum_val = rand();
/* Check for uniqueness of enum member */
- unique = TRUE;
+ unique = true;
for (size_t j = 0; j < i; j++)
if (enum_val == enum_member_vals[j])
- unique = FALSE;
+ unique = false;
} while (!unique);
enum_member_vals[i] = enum_val;
@@ -548,7 +548,7 @@ done:
}
static hid_t
-generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t is_compact)
+generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, bool is_compact)
{
unsigned ndims = 0;
hsize_t *array_dims = NULL;
@@ -599,7 +599,7 @@ done:
* test support for dataspaces.
*/
hid_t
-generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, hbool_t is_compact)
+generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, bool is_compact)
{
hsize_t dataspace_dims[H5S_MAX_RANK];
size_t i;