summaryrefslogtreecommitdiffstats
path: root/test/earray.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-04-01 20:14:21 (GMT)
committerGitHub <noreply@github.com>2021-04-01 20:14:21 (GMT)
commit87d18137ceed7eae1ca7009dda6f4cf2841ff195 (patch)
tree291983f4bc5f9230bf53564e8555272319d382aa /test/earray.c
parentdf75d35cc5295b03dc305ca7e5495fece5737d30 (diff)
downloadhdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.zip
hdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.tar.gz
hdf5-87d18137ceed7eae1ca7009dda6f4cf2841ff195.tar.bz2
Hdf5 merge issue 487 v110 (#533)
* Cleans up a couple of MSVC warnings in testhdf5 (#475) * Fixes a few testhdf5 warnings raised in Visual Studio Visual Studio is grumpier about treating pointers like integers than gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix typos and grammar errors. (#476) * Suppresses the tcheck_version test's abort dialog on Windows (#477) * Suppresses the tcheck_version test's abort dialog on Windows Windows raises a modal abort/retry/ignore dialog box when CRT calls abort(). This change installs a report hook that suppresses the dialog so that the CMake tests don't time out waiting for a nonexistent user to click a dialog box. * Committing clang-format changes * Removes __cdecl from callback Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org>
Diffstat (limited to 'test/earray.c')
-rw-r--r--test/earray.c65
1 files changed, 52 insertions, 13 deletions
diff --git a/test/earray.c b/test/earray.c
index f283df2..8e3204f 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -611,7 +611,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Set invalid element size */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.raw_elmt_size = 0;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -625,7 +628,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Set invalid max. # of elements bits */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 0;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -638,7 +644,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 65;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -652,7 +661,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Set invalid min. # of data block pointers in super blocks */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 0;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -664,7 +676,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 1;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -676,7 +691,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 6;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -690,7 +708,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
/* Set invalid min. # of elements per data block */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.data_blk_min_elmts = 0;
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -706,7 +727,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits =
(uint8_t)(H5VM_log2_gen((uint64_t)test_cparam.idx_blk_elmts) - 1);
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -720,7 +744,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = 4; /* corresponds to 16 elements in data block page, which is
less than the 64 elements for the default settings */
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -732,7 +759,10 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
} /* end if */
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = (uint8_t)(test_cparam.max_nelmts_bits + 1);
- H5E_BEGIN_TRY { ea = H5EA_create(f, &test_cparam, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_create(f, &test_cparam, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened extensible array */
@@ -1166,7 +1196,10 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
ea2 = NULL;
/* Try re-opening the array again (should fail, as array will be deleted) */
- H5E_BEGIN_TRY { ea2 = H5EA_open(f, ea_addr, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea2 = H5EA_open(f, ea_addr, NULL);
+ }
H5E_END_TRY;
if (ea2) {
/* Close opened array */
@@ -1186,7 +1219,10 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* Try re-opening the array again (should fail, as array is now deleted) */
- H5E_BEGIN_TRY { ea = H5EA_open(f, ea_addr, NULL); }
+ H5E_BEGIN_TRY
+ {
+ ea = H5EA_open(f, ea_addr, NULL);
+ }
H5E_END_TRY;
if (ea) {
/* Close opened array */
@@ -2556,7 +2592,10 @@ main(void)
error:
HDputs("*** TESTS FAILED ***");
- H5E_BEGIN_TRY { H5Pclose(fapl); }
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl);
+ }
H5E_END_TRY;
if (api_ctx_pushed)