summaryrefslogtreecommitdiffstats
path: root/test/ohdr.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/ohdr.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/ohdr.c')
-rw-r--r--test/ohdr.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index cc5d526..b7af77f 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -296,7 +296,10 @@ test_ohdr_cache(char *filename, hid_t fapl)
return SUCCEED;
error:
- H5E_BEGIN_TRY { H5Fclose(file); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(file);
+ }
H5E_END_TRY;
return FAIL;
@@ -549,7 +552,10 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
TESTING("object in r/o file with unknown header message & 'fail if unknown always' flag set");
/* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
- H5E_BEGIN_TRY { did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT);
+ }
H5E_END_TRY;
if (did >= 0) {
H5Dclose(did);
@@ -713,7 +719,10 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write"
* flag */
- H5E_BEGIN_TRY { did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT);
+ }
H5E_END_TRY;
if (did >= 0) {
H5Dclose(did);
@@ -725,7 +734,10 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
TESTING("object in r/w file with unknown header message & 'fail if unknown always' flag set");
/* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
- H5E_BEGIN_TRY { did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT);
+ }
H5E_END_TRY;
if (did >= 0) {
H5Dclose(did);
@@ -1774,7 +1786,10 @@ main(void)
char msg[80]; /* Message for file format version */
/* Set version bounds before opening the file */
- H5E_BEGIN_TRY { ret = H5Pset_libver_bounds(fapl, low, high); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ }
H5E_END_TRY;
if (ret < 0) /* Invalid low/high combinations */
@@ -1967,7 +1982,10 @@ main(void)
if (ro != time_new)
TEST_ERROR
time_new = 33333333;
- H5E_BEGIN_TRY { ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2050,7 +2068,10 @@ main(void)
error:
HDputs("*** TESTS FAILED ***");
- H5E_BEGIN_TRY { H5Fclose(file); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(file);
+ }
H5E_END_TRY;
if (api_ctx_pushed)