summaryrefslogtreecommitdiffstats
path: root/test/error_test.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-06-24 03:16:21 (GMT)
committerGitHub <noreply@github.com>2022-06-24 03:16:21 (GMT)
commitac7bddf2af317d4bc34854f5565396da51ff12aa (patch)
treef06f4267731f53e29da848d7d043950ec023f0b3 /test/error_test.c
parent50b3fb09a79cf94064d09087df6c44e680adc3a8 (diff)
downloadhdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.zip
hdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.tar.gz
hdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.tar.bz2
VFD SWMR: sync with develop (#1825)
* bin directory sync * doxygen changes * C++ sync with develop * Fortran sync with develop * Sync various docs with develop * Java sync with develop * More doxygen sync with develop * tools sync with develop * h5test.h testing macros get enclosed in do..while loops (#1721) * Minor examples normalization with develop * hl sync with develop * sprintf to snprintf (#1815) * Misc sync w/ develop * Brings some selection I/O bits over from develop * Brings over some const fixes from develop * Brings over more const bits from develop * Minor bits missed in early syncs * Brings over rest of selection I/O * Sync of mirror VFD changes w/ develop * Committing clang-format changes * Adds missing testpar file Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/error_test.c')
-rw-r--r--test/error_test.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/error_test.c b/test/error_test.c
index 9ac76dd..c546948 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -186,9 +186,9 @@ init_error(void)
H5E_type_t msg_type;
if (NULL == (cls_name = (char *)HDmalloc(HDstrlen(ERR_CLS_NAME) + 1)))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (msg = (char *)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
- TEST_ERROR
+ TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
TEST_ERROR;
@@ -467,12 +467,12 @@ test_create(void)
/* Create an empty error stack */
if ((estack_id = H5Ecreate_stack()) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
if (err_num != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Push an error with a long description */
if (H5Epush(estack_id, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s",
@@ -482,20 +482,20 @@ test_create(void)
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Clear the error stack */
if (H5Eclear2(estack_id) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
if (err_num != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close error stack */
if (H5Eclose_stack(estack_id) < 0)
- TEST_ERROR
+ TEST_ERROR;
return 0;
@@ -530,30 +530,30 @@ test_copy(void)
/* Check the number of errors on stack */
err_num = H5Eget_num(H5E_DEFAULT);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Copy error stack, which clears the original */
if ((estack_id = H5Eget_current_stack()) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack copy */
err_num = H5Eget_num(estack_id);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on original stack */
err_num = H5Eget_num(H5E_DEFAULT);
if (err_num != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Put the stack copy as the default. It closes the stack copy, too. */
if (H5Eset_current_stack(estack_id) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on default stack */
err_num = H5Eget_num(H5E_DEFAULT);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Try to close error stack copy. Should fail because
* the current H5Eset_current_stack closes the stack to be set.
@@ -564,7 +564,7 @@ test_copy(void)
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
return 0;
@@ -600,21 +600,21 @@ test_append(void)
/* Copy error stack, which clears the original */
if ((estack_id1 = H5Eget_current_stack()) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack #1 */
err_num = H5Eget_num(estack_id1);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Create another stack, from scratch */
if ((estack_id2 = H5Ecreate_stack()) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack #2 */
err_num = H5Eget_num(estack_id2);
if (err_num != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Push an error on stack #2 */
if (H5Epush(estack_id2, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE, "%s",
@@ -624,7 +624,7 @@ test_append(void)
/* Check the number of errors on stack #2 */
err_num = H5Eget_num(estack_id2);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Try to append bad error stack IDs */
H5E_BEGIN_TRY
@@ -633,39 +633,39 @@ test_append(void)
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
H5E_BEGIN_TRY
{
ret = H5Eappend_stack(estack_id1, H5E_DEFAULT, FALSE);
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
H5E_BEGIN_TRY
{
ret = H5Eappend_stack(H5E_DEFAULT, estack_id2, FALSE);
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Append error stack #2 to error stack #1, without closing stack #2 */
if (H5Eappend_stack(estack_id1, estack_id2, FALSE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack #1 */
err_num = H5Eget_num(estack_id1);
if (err_num != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack #2 */
err_num = H5Eget_num(estack_id2);
if (err_num != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Append error stack #2 to error stack #1, and close stack #2 */
if (H5Eappend_stack(estack_id1, estack_id2, TRUE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Try to close error stack #2. Should fail because H5Eappend_stack
* should have already closed it.
@@ -676,12 +676,12 @@ test_append(void)
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check the number of errors on stack #1 */
err_num = H5Eget_num(estack_id1);
if (err_num != 3)
- TEST_ERROR
+ TEST_ERROR;
return 0;
@@ -760,10 +760,10 @@ test_filter_error(const char *fname, hid_t fapl)
/* Close/release resources */
if (H5Dclose(dataset) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- TEST_ERROR
+ TEST_ERROR;
return 0;