diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-04 15:49:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 15:49:01 (GMT) |
commit | 838d050a63d310a38f92a510dc94c0656a84bb51 (patch) | |
tree | 55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /hl/test/test_h5do_compat.c | |
parent | 19a59c29b93c04ae069881da2354d3d7048619b9 (diff) | |
download | hdf5-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 'hl/test/test_h5do_compat.c')
-rw-r--r-- | hl/test/test_h5do_compat.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hl/test/test_h5do_compat.c b/hl/test/test_h5do_compat.c index 6f19d4b..95ae98c 100644 --- a/hl/test/test_h5do_compat.c +++ b/hl/test/test_h5do_compat.c @@ -125,7 +125,7 @@ test_direct_chunk_write(hid_t did) offset[0] = 0; for (i = 0; i < NX / CHUNK_NX; i++) { if (H5DOwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, data_size, chunk_data) < 0) - TEST_ERROR + TEST_ERROR; offset[0] += CHUNK_NX; } @@ -171,9 +171,9 @@ test_direct_chunk_read(hid_t did) /* Create dataspaces for reading */ if ((mem_sid = H5Screate_simple(1, chunk_dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; if ((file_sid = H5Screate_simple(1, dims, NULL)) < 0) - TEST_ERROR + TEST_ERROR; /* For each chunk in the dataset, compare the result of H5Dread and H5DOread_chunk. */ for (i = 0; i < NX / CHUNK_NX; i++) { @@ -186,34 +186,34 @@ test_direct_chunk_read(hid_t did) /* Hyperslab selection equals single chunk */ if (H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, start, stride, count, block) < 0) - TEST_ERROR + TEST_ERROR; /* Read the chunk back */ if (H5Dread(did, H5T_NATIVE_INT, mem_sid, file_sid, H5P_DEFAULT, check) < 0) - TEST_ERROR + TEST_ERROR; /* Read the raw chunk back */ HDmemset(chunk_data, 0, CHUNK_NX * sizeof(int)); filter_mask = UINT_MAX; offset[0] = (hsize_t)i * CHUNK_NX; if (H5DOread_chunk(did, H5P_DEFAULT, offset, &filter_mask, chunk_data) < 0) - TEST_ERROR + TEST_ERROR; /* Check filter mask return value */ if (filter_mask != 0) - TEST_ERROR + TEST_ERROR; /* Check that the values are correct */ for (j = 0; j < CHUNK_NX; j++) if (chunk_data[i] != check[i]) - TEST_ERROR + TEST_ERROR; } /* Close */ if (H5Sclose(mem_sid) < 0) - TEST_ERROR + TEST_ERROR; if (H5Sclose(file_sid) < 0) - TEST_ERROR + TEST_ERROR; PASSED(); return 0; |