summaryrefslogtreecommitdiffstats
path: root/test/fillval.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-10-24 00:13:05 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-10-24 00:13:05 (GMT)
commitca3659a01427cd58e5fddb57349b7030e5cb2dcd (patch)
tree5633c0b4bb7b5174518d27b33db43228c1c538d0 /test/fillval.c
parentf9679de85c9de96603d448950da5e1f2c18b4494 (diff)
downloadhdf5-ca3659a01427cd58e5fddb57349b7030e5cb2dcd.zip
hdf5-ca3659a01427cd58e5fddb57349b7030e5cb2dcd.tar.gz
hdf5-ca3659a01427cd58e5fddb57349b7030e5cb2dcd.tar.bz2
HD prefix updates in src/ and test/
Adds missing HD prefixes to API calls in src and test. Adds some extra processing to bin/checkposix to keep the noise levels down when running the script (not comprehensive).
Diffstat (limited to 'test/fillval.c')
-rw-r--r--test/fillval.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/test/fillval.c b/test/fillval.c
index 05570f0..2decbfa 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -201,7 +201,7 @@ test_getset(void)
H5E_END_TRY;
if (fill_i != 0) {
H5_FAILED();
- puts(" H5Pget_fill_value() should return default 0");
+ HDputs(" H5Pget_fill_value() should return default 0");
goto error;
}
@@ -220,8 +220,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) {
H5_FAILED();
- puts(" Failed to get fill value using same data type that was ");
- puts(" used to set the fill value.");
+ HDputs(" Failed to get fill value using same data type that was ");
+ HDputs(" used to set the fill value.");
goto error;
}
@@ -232,8 +232,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) {
H5_FAILED();
- puts(" Failed to get fill value using a data type other than what");
- puts(" was used to set the fill value.");
+ HDputs(" Failed to get fill value using a data type other than what");
+ HDputs(" was used to set the fill value.");
goto error;
}
@@ -246,7 +246,7 @@ test_getset(void)
goto error;
if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) {
H5_FAILED();
- puts(" Resetting the fill value was unsuccessful.");
+ HDputs(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -662,12 +662,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
@@ -682,7 +682,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
- puts(" Got allocated space instead of unallocated.");
+ HDputs(" Got allocated space instead of unallocated.");
HDprintf(" Got %d\n", allocation);
goto error;
}
@@ -694,12 +694,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
@@ -717,7 +717,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- puts(" Got wrong fill value");
+ HDputs(" Got wrong fill value");
HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y,
rd_c.x, rd_c.z);
}
@@ -746,14 +746,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
@@ -786,14 +786,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
HDprintf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
HDprintf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
@@ -811,7 +811,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- puts(" Got wrong fill value");
+ HDputs(" Got wrong fill value");
HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -1649,7 +1649,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
} /* end if */
else {
/* Sanity check */
- assert(dtype_class == H5T_COMPOUND);
+ HDassert(dtype_class == H5T_COMPOUND);
/* Initialize specific values for this datatype */
val_size = sizeof(comp_vl_datatype);
@@ -1701,7 +1701,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si
} /* end for */
/* Check for overflow */
- assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
+ HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size)));
/* Allocate & initialize buffer */
buf = HDmalloc((size_t)(nelmts * val_size));
@@ -2141,7 +2141,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*/
if (H5D_CONTIGUOUS == layout) {
SKIPPED();
- puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
+ HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
goto skip;
}
#endif
@@ -2259,7 +2259,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- puts(" Got a different dimension size than what was set.");
+ HDputs(" Got a different dimension size than what was set.");
HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2271,7 +2271,7 @@ test_compatible(void)
goto error;
if (val_rd != 0) {
H5_FAILED();
- puts(" Got a different value than what was set.");
+ HDputs(" Got a different value than what was set.");
HDprintf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
@@ -2312,7 +2312,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- puts(" Got a different dimension size than what was set.");
+ HDputs(" Got a different dimension size than what was set.");
HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2324,7 +2324,7 @@ test_compatible(void)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
- puts(" Got a different value than what was set.");
+ HDputs(" Got a different value than what was set.");
HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
@@ -2659,11 +2659,11 @@ main(int argc, char *argv[])
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
for (argno = 1; argno < argc; argno++) {
- if (!strcmp(argv[argno], "contiguous"))
+ if (!HDstrcmp(argv[argno], "contiguous"))
test_contig = 1;
- else if (!strcmp(argv[argno], "chunked"))
+ else if (!HDstrcmp(argv[argno], "chunked"))
test_chunk = 1;
- else if (!strcmp(argv[argno], "compact"))
+ else if (!HDstrcmp(argv[argno], "compact"))
test_compact = 1;
else {
HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
@@ -2693,11 +2693,11 @@ main(int argc, char *argv[])
/* Set the FAPL for the type of format */
if (new_format) {
- puts("\nTesting with new file format:");
+ HDputs("\nTesting with new file format:");
my_fapl = fapl2;
} /* end if */
else {
- puts("Testing with old file format:");
+ HDputs("Testing with old file format:");
my_fapl = fapl;
} /* end else */