summaryrefslogtreecommitdiffstats
path: root/tools/libtest
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /tools/libtest
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'tools/libtest')
-rw-r--r--tools/libtest/h5tools_test_utils.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index f060e2c..7f49f97 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -100,7 +100,7 @@ H5_GCC_CLANG_DIAG_OFF("format")
*/
#define JSFAILED_AT() \
{ \
- HDprintf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
+ printf("*FAILED* at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); \
}
/*----------------------------------------------------------------------------
@@ -189,10 +189,10 @@ H5_GCC_CLANG_DIAG_OFF("format")
{ \
JSFAILED_AT() \
if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
+ printf("%s\n", (reason)); \
} \
else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
+ printf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
} \
}
@@ -228,10 +228,10 @@ H5_GCC_CLANG_DIAG_OFF("format")
{ \
JSFAILED_AT() \
if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
+ printf("%s\n", (reason)); \
} \
else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
+ printf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
} \
}
@@ -532,11 +532,11 @@ test_parse_tuple(void)
/* SETUP
*/
- HDassert(parsed == NULL);
- HDassert(cpy == NULL);
+ assert(parsed == NULL);
+ assert(cpy == NULL);
tc = cases[i];
if (show_progress == TRUE) {
- HDprintf("testing %d: %s...\n", i, tc.test_msg);
+ printf("testing %d: %s...\n", i, tc.test_msg);
}
/* VERIFY
@@ -551,11 +551,11 @@ test_parse_tuple(void)
JSVERIFY_STR(tc.exp_elems[elem_i], parsed[elem_i], NULL)
}
/* TEARDOWN */
- HDassert(parsed != NULL);
- HDassert(cpy != NULL);
- HDfree(parsed);
+ assert(parsed != NULL);
+ assert(cpy != NULL);
+ free(parsed);
parsed = NULL;
- HDfree(cpy);
+ free(cpy);
cpy = NULL;
}
else {
@@ -573,9 +573,9 @@ error:
***********/
if (parsed != NULL)
- HDfree(parsed);
+ free(parsed);
if (cpy != NULL)
- HDfree(cpy);
+ free(cpy);
return 1;
@@ -616,14 +616,14 @@ test_populate_ros3_fa(void)
#ifndef H5_HAVE_ROS3_VFD
HDputs(" -SKIP-");
HDputs(" Read-Only S3 VFD not enabled");
- HDfflush(stdout);
+ fflush(stdout);
return 0;
#else
#if H5TOOLS_UTILS_TEST_DEBUG > 0
show_progress = TRUE;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
- HDassert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
+ assert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
/*********
* TESTS *
@@ -635,7 +635,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "z"};
if (show_progress) {
- HDprintf("NULL fapl pointer\n");
+ printf("NULL fapl pointer\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(NULL, values), "fapl pointer cannot be null")
@@ -647,7 +647,7 @@ test_populate_ros3_fa(void)
H5FD_ros3_fapl_t fa = {bad_version, TRUE, "u", "v", "w"};
if (show_progress) {
- HDprintf("NULL values pointer\n");
+ printf("NULL values pointer\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, NULL), "NULL values pointer yields \"default\" fapl")
@@ -666,7 +666,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "", ""};
if (show_progress) {
- HDprintf("all empty values\n");
+ printf("all empty values\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "empty values yields \"default\" fapl")
@@ -685,7 +685,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "z", "a"};
if (show_progress) {
- HDprintf("successful full set\n");
+ printf("successful full set\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "four values")
@@ -704,7 +704,7 @@ test_populate_ros3_fa(void)
const char *values[] = {NULL, "y", "z", NULL};
if (show_progress) {
- HDprintf("NULL region\n");
+ printf("NULL region\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -723,7 +723,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "y", "z", NULL};
if (show_progress) {
- HDprintf("empty region; non-empty id, key\n");
+ printf("empty region; non-empty id, key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -744,10 +744,10 @@ test_populate_ros3_fa(void)
"y", "z"};
if (show_progress) {
- HDprintf("region overflow\n");
+ printf("region overflow\n");
}
- HDassert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
+ assert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -765,7 +765,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", NULL, "z", NULL};
if (show_progress) {
- HDprintf("NULL id\n");
+ printf("NULL id\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -784,7 +784,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "", "z", NULL};
if (show_progress) {
- HDprintf("empty id; non-empty region and key\n");
+ printf("empty id; non-empty region and key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -814,10 +814,10 @@ test_populate_ros3_fa(void)
"z"};
if (show_progress) {
- HDprintf("id overflow\n");
+ printf("id overflow\n");
}
- HDassert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
+ assert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -835,7 +835,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", NULL, NULL};
if (show_progress) {
- HDprintf("NULL key\n");
+ printf("NULL key\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -854,7 +854,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "y", "", NULL};
if (show_progress) {
- HDprintf("empty key; non-empty region and id\n");
+ printf("empty key; non-empty region and id\n");
}
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -873,7 +873,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"", "y", "", NULL};
if (show_progress) {
- HDprintf("empty key and region; non-empty id\n");
+ printf("empty key and region; non-empty id\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -892,7 +892,7 @@ test_populate_ros3_fa(void)
const char *values[] = {"x", "", "", NULL};
if (show_progress) {
- HDprintf("empty key and id; non-empty region\n");
+ printf("empty key and id; non-empty region\n");
}
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
@@ -921,10 +921,10 @@ test_populate_ros3_fa(void)
"Can you separate the various parts of the problem?"};
if (show_progress) {
- HDprintf("key overflow\n");
+ printf("key overflow\n");
}
- HDassert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ assert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN);
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL)
@@ -1134,7 +1134,7 @@ test_set_configured_fapl(void)
fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "setup test %d\t%s\n", i, C.message);
+ fprintf(stderr, "setup test %d\t%s\n", i, C.message);
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1148,7 +1148,7 @@ test_set_configured_fapl(void)
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "before test\n");
+ fprintf(stderr, "before test\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1165,7 +1165,7 @@ test_set_configured_fapl(void)
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after test\n");
+ fprintf(stderr, "after test\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1176,13 +1176,13 @@ test_set_configured_fapl(void)
fapl_id = H5I_INVALID_HID;
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after cleanup\n");
+ fprintf(stderr, "after cleanup\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
}
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "after loop\n");
+ fprintf(stderr, "after loop\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1195,7 +1195,7 @@ error:
***********/
#if UTIL_TEST_DEBUG
- HDfprintf(stderr, "ERROR\n");
+ fprintf(stderr, "ERROR\n");
fflush(stderr);
#endif /* UTIL_TEST_DEBUG */
@@ -1234,18 +1234,18 @@ main(void)
h5reset(); /* h5test? */
#endif /* _H5TEST_ */
- HDfprintf(stdout, "Testing h5tools_utils corpus.\n");
+ fprintf(stdout, "Testing h5tools_utils corpus.\n");
nerrors += test_parse_tuple();
nerrors += test_populate_ros3_fa();
nerrors += test_set_configured_fapl();
if (nerrors > 0) {
- HDfprintf(stdout, "***** %d h5tools_utils TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
+ fprintf(stdout, "***** %d h5tools_utils TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
nerrors = 1;
}
else {
- HDfprintf(stdout, "All h5tools_utils tests passed\n");
+ fprintf(stdout, "All h5tools_utils tests passed\n");
}
return (int)nerrors;