summaryrefslogtreecommitdiffstats
path: root/test/external.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-03-17 15:25:39 (GMT)
committerGitHub <noreply@github.com>2021-03-17 15:25:39 (GMT)
commitc6e4e535469beaa3418b34863d455c8f17ade3f5 (patch)
tree11c5cf08959881ee6cff2df81b1d9f873ddd3dcf /test/external.c
parentf6d919a2ab0034a1ee76ca2d5f59f4d8114c4952 (diff)
downloadhdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.zip
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.gz
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.bz2
Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/external.c')
-rw-r--r--test/external.c50
1 files changed, 40 insertions, 10 deletions
diff --git a/test/external.c b/test/external.c
index c2476b3..c31701d 100644
--- a/test/external.c
+++ b/test/external.c
@@ -134,7 +134,10 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR
/* Test dataset address. Should be undefined. */
- H5E_BEGIN_TRY { dset_addr = H5Dget_offset(dset); }
+ H5E_BEGIN_TRY
+ {
+ dset_addr = H5Dget_offset(dset);
+ }
H5E_END_TRY;
if (dset_addr != HADDR_UNDEF)
FAIL_STACK_ERROR
@@ -220,7 +223,10 @@ test_too_small(hid_t file)
if ((space = H5Screate_simple(1, cur_size, max_size)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ }
H5E_END_TRY;
if (dset >= 0)
FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
@@ -332,7 +338,10 @@ test_large_enough_current_not_eventual(hid_t file)
if ((space = H5Screate_simple(1, cur_size, max_size)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ }
H5E_END_TRY;
if (dset >= 0)
FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
@@ -547,7 +556,10 @@ test_multiple_files(hid_t file)
FAIL_STACK_ERROR;
}
- H5E_BEGIN_TRY { dset = H5Dcreate2(file, "dset7", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ dset = H5Dcreate2(file, "dset7", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ }
H5E_END_TRY;
if (dset >= 0)
FAIL_PUTS_ERROR(" Small external files succeeded instead of failing.");
@@ -599,7 +611,10 @@ test_add_to_unlimited(void)
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100); }
+ H5E_BEGIN_TRY
+ {
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ }
H5E_END_TRY;
if (status >= 0)
FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
@@ -615,7 +630,10 @@ test_add_to_unlimited(void)
return 0;
error:
- H5E_BEGIN_TRY { H5Pclose(dcpl); }
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(dcpl);
+ }
H5E_END_TRY;
return 1;
} /* end test_add_to_unlimited() */
@@ -647,7 +665,10 @@ test_overflow(void)
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED - 1) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100); }
+ H5E_BEGIN_TRY
+ {
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ }
H5E_END_TRY;
if (status >= 0)
FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
@@ -659,7 +680,10 @@ test_overflow(void)
return 0;
error:
- H5E_BEGIN_TRY { H5Pclose(dcpl); }
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(dcpl);
+ }
H5E_END_TRY;
return 1;
} /* end test_overflow() */
@@ -1187,7 +1211,10 @@ test_path_relative_cwd(hid_t fapl)
/* Reopen dataset with different efile_prefix property */
if (H5Pset_efile_prefix(dapl, "//") < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { dset3 = H5Dopen2(file, "dset1", dapl); }
+ H5E_BEGIN_TRY
+ {
+ dset3 = H5Dopen2(file, "dset1", dapl);
+ }
H5E_END_TRY;
if (dset3 >= 0)
FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeded");
@@ -1221,7 +1248,10 @@ test_path_relative_cwd(hid_t fapl)
/* Reopen dataset with different efile_prefix property */
if (H5Pset_efile_prefix(dapl, NULL) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { dset3 = H5Dopen2(file, "dset1", dapl); }
+ H5E_BEGIN_TRY
+ {
+ dset3 = H5Dopen2(file, "dset1", dapl);
+ }
H5E_END_TRY;
if (dset3 >= 0)
FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeded");