summaryrefslogtreecommitdiffstats
path: root/test/bittests.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /test/bittests.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/bittests.c')
-rw-r--r--test/bittests.c278
1 files changed, 139 insertions, 139 deletions
diff --git a/test/bittests.c b/test/bittests.c
index 285f404..6db1705 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -49,7 +49,7 @@ test_find(void)
TESTING("bit search operations");
/* The zero length buffer */
- HDmemset(v1, 0xaa, sizeof v1);
+ memset(v1, 0xaa, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
if (-1 != n) {
H5_FAILED();
@@ -64,7 +64,7 @@ test_find(void)
}
/* The zero buffer */
- HDmemset(v1, 0, sizeof v1);
+ memset(v1, 0, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if (-1 != n) {
H5_FAILED();
@@ -80,24 +80,24 @@ test_find(void)
/* Try all combinations of one byte */
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
- HDmemset(v1, 0, sizeof v1);
+ memset(v1, 0, sizeof v1);
v1[i / 8] = (uint8_t)(1 << (i % 8));
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for set bit %d failed (lsb)!\n", i);
+ printf(" Test for set bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for set bit %d failed (msb)!\n", i);
+ printf(" Test for set bit %d failed (msb)!\n", i);
goto failed;
}
}
/* The one buffer */
- HDmemset(v1, 0xff, sizeof v1);
+ memset(v1, 0xff, sizeof v1);
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
if (-1 != n) {
H5_FAILED();
@@ -113,18 +113,18 @@ test_find(void)
/* Try all combinations of one byte */
for (i = 0; i < 8 * (int)sizeof(v1); i++) {
- HDmemset(v1, 0xff, sizeof v1);
+ memset(v1, 0xff, sizeof v1);
v1[i / 8] &= (uint8_t) ~(1 << (i % 8));
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for clear bit %d failed (lsb)!\n", i);
+ printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
if ((ssize_t)i != n) {
H5_FAILED();
- HDprintf(" Test for clear bit %d failed (lsb)!\n", i);
+ printf(" Test for clear bit %d failed (lsb)!\n", i);
goto failed;
}
}
@@ -133,10 +133,10 @@ test_find(void)
return 0;
failed:
- HDprintf(" v = 0x");
+ printf(" v = 0x");
for (i = 0; i < (int)sizeof(v1); i++)
- HDprintf("%02x", v1[i]);
- HDprintf("\n");
+ printf("%02x", v1[i]);
+ printf("\n");
return -1;
}
@@ -169,8 +169,8 @@ test_copy(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (unsigned)HDrand() % MIN(8 * sizeof(v1), 8 * sizeof(v2));
size = MIN3(size, 8 * sizeof(v1) - s_offset, 8 * sizeof(v2) - d_offset);
- HDmemset(v1, 0xff, sizeof v1);
- HDmemset(v2, 0x00, sizeof v2);
+ memset(v1, 0xff, sizeof v1);
+ memset(v2, 0x00, sizeof v2);
/* Copy some bits to v2 and make sure something was copied */
H5T__bit_copy(v2, d_offset, v1, s_offset, size);
@@ -192,9 +192,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 1);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first copied bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first copied bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -205,9 +205,9 @@ test_copy(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last copied bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last copied bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -223,9 +223,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 1);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last copied bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last copied bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -236,9 +236,9 @@ test_copy(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of copied data "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of copied data "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -252,15 +252,15 @@ test_copy(void)
return 0;
failed:
- HDprintf(" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n", i, (unsigned long)s_offset,
- (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" s = 0x");
+ printf(" i=%d, s_offset=%lu, d_offset=%lu, size=%lu\n", i, (unsigned long)s_offset,
+ (unsigned long)d_offset, (unsigned long)size);
+ printf(" s = 0x");
for (j = sizeof(v1) - 1; j >= 0; --j)
- HDprintf("%02x", v1[j]);
- HDprintf("\n d = 0x");
+ printf("%02x", v1[j]);
+ printf("\n d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -297,7 +297,7 @@ test_shift(void)
shift_dist = (ssize_t)((size_t)HDrand() % size);
/*-------- LEFT-shift some bits and make sure something was shifted --------*/
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, shift_dist, offset, size);
@@ -306,9 +306,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n != (ssize_t)offset + shift_dist) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -319,14 +319,14 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
/*-------- RIGHT-shift some bits and make sure something was shifted --------*/
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, -shift_dist, offset, size);
@@ -335,9 +335,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -348,9 +348,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size) - shift_dist - 1) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
@@ -363,7 +363,7 @@ test_shift(void)
else
shift_dist = -((ssize_t)size);
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
H5T__bit_shift(vector, shift_dist, offset, size);
@@ -372,9 +372,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all bits are zero in destination(LSB) "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all bits are zero in destination(LSB) "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -382,9 +382,9 @@ test_shift(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all bits are zero in destination(MSB) "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all bits are zero in destination(MSB) "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -393,11 +393,11 @@ test_shift(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n", i, (unsigned long)offset,
- (unsigned long)size, (unsigned long)shift_dist);
+ printf(" i=%d, offset=%lu, size=%lu, shift_dist=%lu\n", i, (unsigned long)offset, (unsigned long)size,
+ (unsigned long)shift_dist);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -432,7 +432,7 @@ test_increment(void)
if (size == 0)
continue;
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
if (size > 1) /* if size=6, make a sequence like 011111 */
H5T__bit_set(vector, offset, size - 1, 1);
else /* if size=1, just set this one bit to 1 */
@@ -445,16 +445,16 @@ test_increment(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (size != 1 && (size_t)n != offset + size - 1) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (size == 1 && n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -465,16 +465,16 @@ test_increment(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (size != 1 && n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (size == 1 && n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -483,10 +483,10 @@ test_increment(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -522,7 +522,7 @@ test_decrement(void)
continue;
/* All-zero sequence will become 111111(size=6) after decrement */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
/* decrement the sequence by one */
H5T__bit_dec(vector, offset, size);
@@ -531,9 +531,9 @@ test_decrement(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -544,9 +544,9 @@ test_decrement(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -555,10 +555,10 @@ test_decrement(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -594,7 +594,7 @@ test_negate(void)
continue;
/* All-zero sequence will become 111111(size=6) after negating */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
/* negate the sequence */
H5T__bit_neg(vector, offset, size);
@@ -603,9 +603,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if ((size_t)n != offset) {
H5_FAILED();
- HDprintf(" Unable to find first bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -616,14 +616,14 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n != (ssize_t)(offset + size - 1)) {
H5_FAILED();
- HDprintf(" Unable to find last bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
/* All-one sequence will become 000000(size=6) after negating */
- HDmemset(vector, 0x00, sizeof vector);
+ memset(vector, 0x00, sizeof vector);
H5T__bit_set(vector, offset, size, 1);
/* negate the sequence */
@@ -633,9 +633,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_LSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bits in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bits in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
@@ -646,9 +646,9 @@ test_negate(void)
n = H5T__bit_find(vector, (size_t)0, 8 * sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
- HDprintf(" Unable to verify all-zero bits in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to verify all-zero bits in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
}
@@ -657,10 +657,10 @@ test_negate(void)
return 0;
failed:
- HDprintf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
+ printf(" i=%d, offset=%lu, size=%lu\n", i, (unsigned long)offset, (unsigned long)size);
for (j = sizeof(vector) - 1; j >= 0; --j)
- HDprintf("%02x", vector[j]);
- HDprintf("\n");
+ printf("%02x", vector[j]);
+ printf("\n");
return -1;
}
@@ -692,7 +692,7 @@ test_set(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (size_t)HDrand() % (8 * sizeof(v2));
size = MIN(size, 8 * sizeof(v2) - d_offset);
- HDmemset(v2, 0x00, sizeof v2);
+ memset(v2, 0x00, sizeof v2);
/* Set some bits in v2 */
H5T__bit_set(v2, d_offset, size, TRUE);
@@ -714,9 +714,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 1);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first set bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first set bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -727,9 +727,9 @@ test_set(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last set bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last set bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -745,9 +745,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 1);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last set bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last set bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -758,9 +758,9 @@ test_set(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of set bit region "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of set bit region "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -774,11 +774,11 @@ test_set(void)
return 0;
failed:
- HDprintf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" d = 0x");
+ printf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
+ printf(" d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -810,7 +810,7 @@ test_clear(void)
d_offset = (size_t)HDrand() % (8 * sizeof v2);
size = (size_t)HDrand() % (8 * sizeof(v2));
size = MIN(size, 8 * sizeof(v2) - d_offset);
- HDmemset(v2, 0xff, sizeof v2);
+ memset(v2, 0xff, sizeof v2);
/* Clear some bits in v2 */
H5T__bit_set(v2, d_offset, size, FALSE);
@@ -832,9 +832,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_LSB, 0);
if (size > 0 && n != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find first cleared bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find first cleared bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -845,9 +845,9 @@ test_clear(void)
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 1);
if (d_offset + size < 8 * sizeof(v2) && n != (ssize_t)size) {
H5_FAILED();
- HDprintf(" Unable to find last cleared bit in destination "
- "(n=%d)\n",
- (int)n);
+ printf(" Unable to find last cleared bit in destination "
+ "(n=%d)\n",
+ (int)n);
goto failed;
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
@@ -863,9 +863,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, 8 * sizeof(v2), H5T_BIT_MSB, 0);
if (size > 0 && (size_t)(n + 1) != d_offset + size) {
H5_FAILED();
- HDprintf(" Unable to find last cleared bit in destination "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find last cleared bit in destination "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == size && n >= 0) {
@@ -876,9 +876,9 @@ test_clear(void)
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 1);
if (d_offset > 0 && n + 1 != (ssize_t)d_offset) {
H5_FAILED();
- HDprintf(" Unable to find beginning of cleared bit region "
- "(reverse, n=%d)\n",
- (int)n);
+ printf(" Unable to find beginning of cleared bit region "
+ "(reverse, n=%d)\n",
+ (int)n);
goto failed;
}
if (0 == d_offset && n >= 0) {
@@ -892,11 +892,11 @@ test_clear(void)
return 0;
failed:
- HDprintf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
- HDprintf(" d = 0x");
+ printf(" i=%d, d_offset=%lu, size=%lu\n", i, (unsigned long)d_offset, (unsigned long)size);
+ printf(" d = 0x");
for (j = sizeof(v2) - 1; j >= 0; --j)
- HDprintf("%02x", v2[j]);
- HDprintf("\n");
+ printf("%02x", v2[j]);
+ printf("\n");
return -1;
}
@@ -932,12 +932,12 @@ main(void)
nerrors += test_negate() < 0 ? 1 : 0;
if (nerrors) {
- HDprintf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %u FAILURE%s! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
}
- HDprintf("All bit tests passed.\n");
+ printf("All bit tests passed.\n");
H5close();
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
} /* end main() */