summaryrefslogtreecommitdiffstats
path: root/test/accum.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 14:31:56 (GMT)
committerGitHub <noreply@github.com>2023-06-28 14:31:56 (GMT)
commit7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch)
tree44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /test/accum.c
parent622fcbd13881fbc58bbeaed3062583b759f5e864 (diff)
downloadhdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.zip
hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.gz
hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.bz2
Rename HDassert() to assert() (#3191)
* Change HDassert to assert * Fix bin/make_err
Diffstat (limited to 'test/accum.c')
-rw-r--r--test/accum.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/test/accum.c b/test/accum.c
index 80a8353..ebd7a90 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -193,9 +193,9 @@ test_write_read(H5F_t *f)
/* Allocate buffers */
write_buf = (int *)HDmalloc(1024 * sizeof(int));
- HDassert(write_buf);
+ assert(write_buf);
read_buf = (int *)HDcalloc((size_t)1024, sizeof(int));
- HDassert(read_buf);
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 1024; i++)
@@ -252,9 +252,9 @@ test_write_read_nonacc_front(H5F_t *f)
/* Allocate buffers */
write_buf = (int *)HDmalloc(2048 * sizeof(int));
- HDassert(write_buf);
+ assert(write_buf);
read_buf = (int *)HDcalloc((size_t)2048, sizeof(int));
- HDassert(read_buf);
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 2048; i++)
@@ -317,9 +317,9 @@ test_write_read_nonacc_end(H5F_t *f)
/* Allocate buffers */
write_buf = (int *)HDmalloc(2048 * sizeof(int));
- HDassert(write_buf);
+ assert(write_buf);
read_buf = (int *)HDcalloc((size_t)2048, sizeof(int));
- HDassert(read_buf);
+ assert(read_buf);
/* Fill buffer with data, zero out read buffer */
for (i = 0; i < 2048; i++)
@@ -384,11 +384,11 @@ test_free(H5F_t *f)
/* Write and free the whole accumulator. */
wbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
expect = (int32_t *)HDmalloc(256 * sizeof(int32_t));
- HDassert(expect);
+ assert(expect);
/* Fill buffer with data */
for (i = 0; i < 256; i++)
@@ -615,9 +615,9 @@ test_accum_overlap(H5F_t *f)
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 40 */
@@ -822,9 +822,9 @@ test_accum_overlap_clean(H5F_t *f)
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 40 */
@@ -1041,9 +1041,9 @@ test_accum_non_overlap_size(H5F_t *f)
/* Allocate buffers */
wbuf = (int *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 140 */
@@ -1115,9 +1115,9 @@ test_accum_overlap_size(H5F_t *f)
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Case 1: No metadata in accumulator */
/* Write 10 1's at address 64 */
@@ -1200,9 +1200,9 @@ test_accum_adjust(H5F_t *f)
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Fill up write buffer */
for (i = 0; i < s; i++)
@@ -1498,9 +1498,9 @@ test_read_after(H5F_t *f)
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t));
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t));
- HDassert(rbuf);
+ assert(rbuf);
/* Fill up write buffer with 1s */
for (i = 0; i < s; i++)
@@ -1580,13 +1580,13 @@ test_big(H5F_t *f)
/* Allocate space for the write & read buffers */
wbuf = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE);
- HDassert(wbuf);
+ assert(wbuf);
wbuf2 = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE);
- HDassert(wbuf2);
+ assert(wbuf2);
rbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
- HDassert(rbuf);
+ assert(rbuf);
zbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1);
- HDassert(zbuf);
+ assert(zbuf);
/* Initialize write buffers */
for (u = 0; u < BIG_BUF_SIZE; u++) {
@@ -1951,9 +1951,9 @@ test_random_write(H5F_t *f)
/* Allocate space for the write & read buffers */
wbuf = (uint8_t *)HDmalloc((size_t)RANDOM_BUF_SIZE);
- HDassert(wbuf);
+ assert(wbuf);
rbuf = (uint8_t *)HDcalloc((size_t)RANDOM_BUF_SIZE, (size_t)1);
- HDassert(rbuf);
+ assert(rbuf);
/* Initialize write buffer */
for (u = 0; u < RANDOM_BUF_SIZE; u++)
@@ -1971,9 +1971,9 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
/* Allocate space for the segment length buffer */
off = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
- HDassert(off);
+ assert(off);
len = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t));
- HDassert(len);
+ assert(len);
/* Randomly choose lengths of segments */
cur_off = 0;