summaryrefslogtreecommitdiffstats
path: root/test/direct_chunk.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-05-04 15:49:01 (GMT)
committerGitHub <noreply@github.com>2022-05-04 15:49:01 (GMT)
commit838d050a63d310a38f92a510dc94c0656a84bb51 (patch)
tree55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /test/direct_chunk.c
parent19a59c29b93c04ae069881da2354d3d7048619b9 (diff)
downloadhdf5-838d050a63d310a38f92a510dc94c0656a84bb51.zip
hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.gz
hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.bz2
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops * Adds missed macro in hl C++ code * Fixes macro in Windows code
Diffstat (limited to 'test/direct_chunk.c')
-rw-r--r--test/direct_chunk.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index ac4ef8d..22f8be1 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -412,19 +412,19 @@ test_direct_chunk_overwrite_data(hid_t fid)
/* Create the dataset's data space */
if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set chunk size and filll value */
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_fill_value(dcpl_id, tid, &fill_value) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl_id, OVERWRITE_NDIMS, chunk_dims) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create dataset */
if ((did = H5Dcreate2(fid, DATASETNAME7, tid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Initialize data buffers */
n = 0;
@@ -437,35 +437,35 @@ test_direct_chunk_overwrite_data(hid_t fid)
/* Write chunk data using the direct write function. */
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Write second chunk. */
offset[2] = OVERWRITE_CHUNK_NX;
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Overwrite first chunk. */
offset[2] = 0;
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, overwrite_buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Read the data back out */
if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Ensure that the data are correct in chunk 1 */
for (i = 0; i < OVERWRITE_CHUNK_NY; i++)
for (j = 0; j < OVERWRITE_CHUNK_NX; j++) {
if (read_buf[i][j] != OVERWRITE_VALUE)
- TEST_ERROR
+ TEST_ERROR;
}
if (H5Pclose(dcpl_id) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -2040,7 +2040,7 @@ test_read_unallocated_chunk(hid_t file)
/* Check that the chunk read call does not succeed. */
if (status != -1)
- TEST_ERROR
+ TEST_ERROR;
/* Query the size of the non-existent chunk */
direct_chunk_nbytes = ULONG_MAX;
@@ -2052,9 +2052,9 @@ test_read_unallocated_chunk(hid_t file)
/* Check that the chunk storage size call does not succeed. */
if (status != -1)
- TEST_ERROR
+ TEST_ERROR;
if (direct_chunk_nbytes != ULONG_MAX)
- TEST_ERROR
+ TEST_ERROR;
}
}
@@ -2204,7 +2204,7 @@ test_single_chunk(unsigned config)
/* Verify returned filter mask */
if (filters != 0)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
else
/* Read the data */
@@ -2215,7 +2215,7 @@ test_single_chunk(unsigned config)
for (i = 0; i < DIM0; i++)
for (j = 0; j < DIM1; j++)
if (rdata[i][j] != wdata[i][j])
- TEST_ERROR
+ TEST_ERROR;
/*
* Close and release resources