summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorgithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2022-03-08 03:13:15 (GMT)
committergithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2022-03-08 03:13:15 (GMT)
commit4baa3786086c6cb68d69b72e9517c6b813bde3d7 (patch)
treeb6ca8dab0f3df9dda675a6f1356a6c12fd706ed5 /hl/test
parente4912d2877ae0f2accf90288bff69f907bf5b3a4 (diff)
downloadhdf5-4baa3786086c6cb68d69b72e9517c6b813bde3d7.zip
hdf5-4baa3786086c6cb68d69b72e9517c6b813bde3d7.tar.gz
hdf5-4baa3786086c6cb68d69b72e9517c6b813bde3d7.tar.bz2
Committing clang-format changes
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/h5hltest.h8
-rw-r--r--hl/test/test_file_image.c2
-rw-r--r--hl/test/test_lite.c33
-rw-r--r--hl/test/test_packet_vlen.c39
-rw-r--r--hl/test/test_table.c9
5 files changed, 44 insertions, 47 deletions
diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h
index 7c98fde..cd35d08 100644
--- a/hl/test/h5hltest.h
+++ b/hl/test/h5hltest.h
@@ -30,13 +30,13 @@
/* Macros used in HL tests */
#define HL_TESTING2(WHAT) \
{ \
- printf("Testing %-62s", WHAT); \
- fflush(stdout); \
+ printf("Testing %-62s", WHAT); \
+ fflush(stdout); \
}
#define HL_TESTING3(WHAT) \
{ \
- printf("Testing %-62s", WHAT); \
- fflush(stdout); \
+ printf("Testing %-62s", WHAT); \
+ fflush(stdout); \
}
/* Implements verbose 'assert' with 'goto error' exit */
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index f605aff..a1e0e8e 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -243,7 +243,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
/* Clear status_flags in the superblock for the vfd buffer: file locking is using status_flags
*/
memset((uint8_t *)tmp_ptr + SUPER_STATUS_FLAGS_OFF_V0_V1, (int)0,
- (size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
+ (size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
/* Does the comparison */
if (memcmp(tmp_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
FAIL_PUTS_ERROR("comparison of TMP vfd and user buffer failed");
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 1b6cf5f..25d9558 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1229,7 +1229,7 @@ test_strings(void)
goto out;
}
if (strcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1264,7 +1264,7 @@ test_strings(void)
goto out;
}
if (strcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
- "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
+ "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1281,9 +1281,9 @@ test_strings(void)
goto out;
}
if (strncmp(dt_str,
- "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len - 1) != 0) {
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len - 1) != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1304,9 +1304,9 @@ test_strings(void)
goto out;
str_len = strlen(dt_str);
if (strncmp(dt_str,
- "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len) != 0) {
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len) != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1365,9 +1365,8 @@ test_opaques(void)
free(dt_str);
goto out;
}
- if (strcmp(
- dt_str,
- "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
+ if (strcmp(dt_str,
+ "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
@@ -1446,8 +1445,8 @@ test_enums(void)
goto out;
}
if (strcmp(dt_str,
- "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
- " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
+ "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
+ " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
@@ -1572,8 +1571,8 @@ test_arrays(void)
goto out;
}
if (strcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
- " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
- "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
+ " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
+ "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1633,7 +1632,7 @@ test_compounds(void)
goto out;
}
if (strcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
- "\"two_field\" : 6;\n }") != 0) {
+ "\"two_field\" : 6;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1767,7 +1766,7 @@ test_compound_bug(void)
if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
if (strcmp(memb_name, "desc____________________________________________________________________________"
- "_____________") != 0) {
+ "_____________") != 0) {
H5free_memory(memb_name);
goto out;
}
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index 6c6afaa..935923f 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -258,15 +258,15 @@ test_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%d, readBuf[%u].len=%d\n",
- __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
+ __LINE__, uu, (int)writeBuf[uu].len, uu, (int)readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
- fprintf(
- stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n", vv,
- (int)((unsigned int *)writeBuf[uu].p)[vv], vv, (int)((unsigned int *)readBuf[uu].p)[vv]);
+ fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%d]=%d, readBuf[uu].p[%d]=%d\n",
+ vv, (int)((unsigned int *)writeBuf[uu].p)[vv], vv,
+ (int)((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -430,19 +430,19 @@ test_compound_VL_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
- writeBuf[uu].u, uu, readBuf[uu].u);
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
- (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
fprintf(stderr,
- "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n",
- __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ "%d: VL data length don't match!, writeBuf[%d].v.len=%zu, readBuf[%d].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
@@ -450,13 +450,13 @@ test_compound_VL_VLtype(void)
(size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
- __LINE__, uu, vv, t1->len, t2->len);
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
- ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
@@ -1293,15 +1293,14 @@ testfl_VLof_comptype(void)
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].len != readBuf[uu].len) {
fprintf(stderr, "%d: VL data length don't match!, writeBuf[%u].len=%zu, readBuf[%u].len=%zu\n",
- __LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
+ __LINE__, uu, writeBuf[uu].len, uu, readBuf[uu].len);
continue;
} /* write len != read len */
for (vv = 0; vv < (uu + 1); vv++) {
if (((unsigned int *)writeBuf[uu].p)[vv] != ((unsigned int *)readBuf[uu].p)[vv]) {
- fprintf(stderr,
- "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n", vv,
- ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
+ fprintf(stderr, "VL data values don't match!, writeBuf[uu].p[%u]=%u, readBuf[uu].p[%u]=%u\n",
+ vv, ((unsigned int *)writeBuf[uu].p)[vv], vv, ((unsigned int *)readBuf[uu].p)[vv]);
continue;
} /* write value != read value */
}
@@ -1465,19 +1464,19 @@ testfl_compound_VL_VLtype(void)
for (uu = 0; uu < NRECORDS; uu++) {
if (writeBuf[uu].u != readBuf[uu].u) {
fprintf(stderr, "Integer components don't match!, writeBuf[%u].u=%u, readBuf[%u].u=%u\n", uu,
- writeBuf[uu].u, uu, readBuf[uu].u);
+ writeBuf[uu].u, uu, readBuf[uu].u);
continue;
} /* end if */
if (!H5_FLT_ABS_EQUAL(writeBuf[uu].f, readBuf[uu].f)) {
fprintf(stderr, "Float components don't match!, writeBuf[%u].f=%f, readBuf[%u].f=%f\n", uu,
- (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
+ (double)writeBuf[uu].f, uu, (double)readBuf[uu].f);
continue;
} /* end if */
if (writeBuf[uu].v.len != readBuf[uu].v.len) {
fprintf(stderr,
- "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n",
- __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
+ "%d: VL data length don't match!, writeBuf[%u].v.len=%zu, readBuf[%u].v.len=%zu\n",
+ __LINE__, uu, writeBuf[uu].v.len, uu, readBuf[uu].v.len);
continue;
} /* end if */
@@ -1485,13 +1484,13 @@ testfl_compound_VL_VLtype(void)
(size_t)vv < readBuf[uu].v.len; vv++, t1++, t2++) {
if (t1->len != t2->len) {
fprintf(stderr, "%d: VL data length don't match!, uu=%u, vv=%u, t1->len=%zu, t2->len=%zu\n",
- __LINE__, uu, vv, t1->len, t2->len);
+ __LINE__, uu, vv, t1->len, t2->len);
continue;
} /* end if */
for (ww = 0; (size_t)ww < t2->len; ww++) {
if (((unsigned int *)t1->p)[ww] != ((unsigned int *)t2->p)[ww]) {
fprintf(stderr, "VL data values don't match!, t1->p[%u]=%u, t2->p[%u]=%u\n", ww,
- ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
+ ((unsigned int *)t1->p)[ww], ww, ((unsigned int *)t2->p)[ww]);
continue;
} /* end if */
} /* end for */
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 66718e2..0eb35fa 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -156,9 +156,9 @@ cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf)
!H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) {
fprintf(stderr, "read and write buffers have differences\n");
fprintf(stderr, "%s %ld %f %f %d\n", rbuf[i].name, rbuf[i].longi, (double)rbuf[i].pressure,
- rbuf[i].temperature, rbuf[i].lati);
+ rbuf[i].temperature, rbuf[i].lati);
fprintf(stderr, "%s %ld %f %f %d\n", wbuf[j].name, wbuf[j].longi, (double)wbuf[j].pressure,
- wbuf[j].temperature, wbuf[j].lati);
+ wbuf[j].temperature, wbuf[j].lati);
return -1;
}
return 0;
@@ -1024,10 +1024,9 @@ test_table(hid_t fid, int do_write)
if (rbuf[i].lati != position_in[i - NRECORDS_ADD + 1].lati ||
rbuf[i].longi != position_in[i - NRECORDS_ADD + 1].longi ||
!H5_FLT_ABS_EQUAL(rbuf[i].pressure, pressure_in[i - NRECORDS_ADD + 1])) {
- fprintf(stderr, "%ld %f %d\n", rbuf[i].longi, (double)rbuf[i].pressure,
- rbuf[i].lati);
+ fprintf(stderr, "%ld %f %d\n", rbuf[i].longi, (double)rbuf[i].pressure, rbuf[i].lati);
fprintf(stderr, "%ld %f %d\n", position_in[i].longi, (double)pressure_in[i],
- position_in[i].lati);
+ position_in[i].lati);
goto out;
}
}