diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2024-03-10 19:42:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 19:42:16 (GMT) |
commit | f0ba8baa0d21197df828f3054840755a45105ac0 (patch) | |
tree | 2e9e98644e95f2be61208a3fb72171a10ad7dabf /test | |
parent | ef401a5f5edf2fc689334a485a6c2ec3f53ecb85 (diff) | |
download | hdf5-f0ba8baa0d21197df828f3054840755a45105ac0.zip hdf5-f0ba8baa0d21197df828f3054840755a45105ac0.tar.gz hdf5-f0ba8baa0d21197df828f3054840755a45105ac0.tar.bz2 |
Minimize use of abort() (#4110)
The abort() call is used at several places where it probably shouldn't.
Diffstat (limited to 'test')
-rw-r--r-- | test/hyperslab.c | 4 | ||||
-rw-r--r-- | test/tmisc.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/test/hyperslab.c b/test/hyperslab.c index 2777e04..03b0e9a 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -343,7 +343,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ break; default: - HDabort(); + FAIL_PUTS_ERROR("Unhandled case"); } /* end switch */ snprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub); @@ -406,7 +406,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ break; default: - HDabort(); + FAIL_PUTS_ERROR("Unhandled case"); } /* end switch */ /* diff --git a/test/tmisc.c b/test/tmisc.c index 0022aa6..be1cebf 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -6118,8 +6118,7 @@ test_misc36_cb1(void *_ctx) VERIFY(is_terminating, true, "H5is_library_terminating"); /* Verify correct ordering for 'atclose' callbacks */ - if (0 != *ctx) - HDabort(); + VERIFY(*ctx, 0, "Wrong context value"); /* Update context value */ *ctx = 1; @@ -6139,8 +6138,7 @@ test_misc36_cb2(void *_ctx) VERIFY(is_terminating, true, "H5is_library_terminating"); /* Verify correct ordering for 'atclose' callbacks */ - if (1 != *ctx) - HDabort(); + VERIFY(*ctx, 1, "Wrong context value"); /* Update context value */ *ctx = 2; |