summaryrefslogtreecommitdiffstats
path: root/test/file_image.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/file_image.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/file_image.c')
-rw-r--r--test/file_image.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/test/file_image.c b/test/file_image.c
index 7e8219c..f6075d5 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -1064,21 +1064,30 @@ test_get_file_image_error_rejection(void)
VERIFY(image_ptr != NULL, "HDmalloc(1) failed.");
/* load the image of the file into the buffer */
- H5E_BEGIN_TRY { bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)(image_size - 1)); }
+ H5E_BEGIN_TRY
+ {
+ bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)(image_size - 1));
+ }
H5E_END_TRY;
VERIFY(bytes_read < 0, "H5Fget_file_image(2 -- test 1) succeeded.");
/* Call H5Fget_file_image() with good buffer and buffer size,
* but non-existant file_id. Should fail.
*/
- H5E_BEGIN_TRY { bytes_read = H5Fget_file_image((hid_t)0, image_ptr, (size_t)(image_size)); }
+ H5E_BEGIN_TRY
+ {
+ bytes_read = H5Fget_file_image((hid_t)0, image_ptr, (size_t)(image_size));
+ }
H5E_END_TRY;
VERIFY(bytes_read < 0, "H5Fget_file_image(3 -- test 1) succeeded.");
/* Call H5Fget_file_image() with good buffer and buffer size,
* but a file_id of the wrong type. Should fail.
*/
- H5E_BEGIN_TRY { bytes_read = H5Fget_file_image(dset_id, image_ptr, (size_t)(image_size)); }
+ H5E_BEGIN_TRY
+ {
+ bytes_read = H5Fget_file_image(dset_id, image_ptr, (size_t)(image_size));
+ }
H5E_END_TRY;
VERIFY(bytes_read < 0, "H5Fget_file_image(4 -- test 1) succeeded.");
@@ -1179,7 +1188,10 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Fflush failed");
/* attempt to get the size of the file -- should fail */
- H5E_BEGIN_TRY { image_size = H5Fget_file_image(file_id, NULL, (size_t)0); }
+ H5E_BEGIN_TRY
+ {
+ image_size = H5Fget_file_image(file_id, NULL, (size_t)0);
+ }
H5E_END_TRY;
VERIFY(image_size == -1, "H5Fget_file_image(5) succeeded.");
@@ -1238,7 +1250,10 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Fflush failed");
/* attempt to get the size of the file -- should fail */
- H5E_BEGIN_TRY { image_size = H5Fget_file_image(file_id, NULL, (size_t)0); }
+ H5E_BEGIN_TRY
+ {
+ image_size = H5Fget_file_image(file_id, NULL, (size_t)0);
+ }
H5E_END_TRY;
VERIFY(image_size == -1, "H5Fget_file_image(6) succeeded.");
@@ -1295,7 +1310,10 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Fflush failed");
/* attempt to get the size of the file -- should fail */
- H5E_BEGIN_TRY { image_size = H5Fget_file_image(file_id, NULL, (size_t)0); }
+ H5E_BEGIN_TRY
+ {
+ image_size = H5Fget_file_image(file_id, NULL, (size_t)0);
+ }
H5E_END_TRY;
VERIFY(image_size == -1, "H5Fget_file_image(7) succeeded.");