summaryrefslogtreecommitdiffstats
path: root/test/stab.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/stab.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/stab.c')
-rw-r--r--test/stab.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/test/stab.c b/test/stab.c
index 6bdba65..78d13cc 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -83,7 +83,7 @@ static const char *FILENAME[] = {"stab", NULL};
*-------------------------------------------------------------------------
*/
static int
-test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_misc(hid_t fcpl, hid_t fapl, bool new_format)
{
hid_t fid = (-1); /* File ID */
hid_t g1 = (-1), g2 = (-1), g3 = (-1);
@@ -184,7 +184,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_long(hid_t fcpl, hid_t fapl, bool new_format)
{
hid_t fid = (-1); /* File ID */
hid_t g1 = (-1), g2 = (-1);
@@ -268,7 +268,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
+test_large(hid_t fcpl, hid_t fapl, bool new_format)
{
hid_t fid = (-1); /* File ID */
hid_t cwg = (-1), dir = (-1); /* Group IDs */
@@ -293,7 +293,7 @@ test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
if ((cwg = H5Gcreate2(fid, "/big", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (new_format)
- if (H5G__has_stab_test(cwg) != FALSE)
+ if (H5G__has_stab_test(cwg) != false)
TEST_ERROR;
for (i = 0; i < LARGE_NOBJS; i++) {
HDsnprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
@@ -303,7 +303,7 @@ test_large(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR;
}
if (new_format)
- if (H5G__is_new_dense_test(cwg) != TRUE)
+ if (H5G__is_new_dense_test(cwg) != true)
TEST_ERROR;
if (H5Gclose(cwg) < 0)
TEST_ERROR;
@@ -431,7 +431,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or symbol table */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
@@ -440,7 +440,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -448,9 +448,9 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != 1)
TEST_ERROR;
@@ -463,7 +463,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -472,13 +472,13 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end for */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != LIFECYCLE_MAX_COMPACT)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != FALSE)
+ if (H5G__is_new_dense_test(gid) != false)
TEST_ERROR;
/* Check that the object header is only one chunk and the space has been allocated correctly */
@@ -499,7 +499,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -507,11 +507,11 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Check that the object header is still one chunk and the space has been allocated correctly */
@@ -537,11 +537,11 @@ lifecycle(hid_t fcpl, hid_t fapl2)
} /* end while */
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink one more object from the group, which should transform back to using links */
@@ -551,9 +551,9 @@ lifecycle(hid_t fcpl, hid_t fapl2)
u--;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, &nmsgs) != TRUE)
+ if (H5G__has_links_test(gid, &nmsgs) != true)
TEST_ERROR;
if (nmsgs != (LIFECYCLE_MIN_DENSE - 1))
TEST_ERROR;
@@ -568,7 +568,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -663,7 +663,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first group with "long" name */
@@ -671,7 +671,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -680,11 +680,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Create second group with "long" name */
@@ -693,7 +693,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -702,11 +702,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink second object from top group */
@@ -715,11 +715,11 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should still be dense storage to hold links, since name is too long for object header message) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink first object from top group */
@@ -729,7 +729,7 @@ long_compact(hid_t fcpl, hid_t fapl2)
/* Check on top group's status */
/* (Should have deleted the dense storage now) */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Free object name */
@@ -809,11 +809,11 @@ read_old(void)
TEST_ERROR;
/* Check on old group's status */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Create a bunch of objects in the group */
@@ -823,7 +823,7 @@ read_old(void)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -833,11 +833,11 @@ read_old(void)
/* Check on old group's status */
/* (Should stay in old "symbol table" form) */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Delete new objects from old group */
@@ -849,11 +849,11 @@ read_old(void)
/* Check on old group's status */
/* (Should stay in old "symbol table" form, but have no links) */
- if (H5G__is_empty_test(gid) == FALSE)
+ if (H5G__is_empty_test(gid) == false)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__has_stab_test(gid) != TRUE)
+ if (H5G__has_stab_test(gid) != true)
TEST_ERROR;
/* Close old group */
@@ -947,7 +947,7 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Use internal testing routine to check that the group has no links or dense storage */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Create first "bottom" group */
@@ -956,7 +956,7 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on bottom group's status */
- if (H5G__is_empty_test(gid2) != TRUE)
+ if (H5G__is_empty_test(gid2) != true)
TEST_ERROR;
/* Close bottom group */
@@ -964,11 +964,11 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) == TRUE)
+ if (H5G__is_empty_test(gid) == true)
TEST_ERROR;
- if (H5G__has_links_test(gid, NULL) == TRUE)
+ if (H5G__has_links_test(gid, NULL) == true)
TEST_ERROR;
- if (H5G__is_new_dense_test(gid) != TRUE)
+ if (H5G__is_new_dense_test(gid) != true)
TEST_ERROR;
/* Unlink object from top group */
@@ -977,7 +977,7 @@ no_compact(hid_t fcpl, hid_t fapl2)
FAIL_STACK_ERROR;
/* Check on top group's status */
- if (H5G__is_empty_test(gid) != TRUE)
+ if (H5G__is_empty_test(gid) != true)
TEST_ERROR;
/* Close top group */
@@ -1089,7 +1089,7 @@ gcpl_on_root(hid_t fapl2)
/* Create a link creation property list, with intermediate group creation set */
if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl, true) < 0)
TEST_ERROR;
/* Create a group and intermediate groups, to check if root group settings are inherited */
@@ -1376,8 +1376,8 @@ main(void)
hid_t fcpl, fcpl2; /* File creation property list ID */
unsigned new_format; /* Whether to use the new format or not */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_is_default_compatible;
+ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */
+ bool driver_is_default_compatible;
int nerrors = 0;
/* Get the VFD to use */
@@ -1386,7 +1386,7 @@ main(void)
env_h5_drvr = "nomatch";
/* VFD that does not support contiguous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
@@ -1415,7 +1415,7 @@ main(void)
TEST_ERROR;
/* Loop over using new group format */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl = fapl;
hid_t my_fcpl = fcpl;