summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c11
-rw-r--r--test/h5test.h3
2 files changed, 13 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c
index fb5b83d..ed3e51a 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -129,6 +129,17 @@ h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data)
return 0;
}
+void
+h5_testing(const char *fmt, ...)
+{
+ va_list ap;
+ char buf[62 + 1]; /* room for 62-char field + NUL */
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+ printf("Testing %s", buf);
+ fflush(stdout);
+}
/*-------------------------------------------------------------------------
* Function: h5_clean_files
diff --git a/test/h5test.h b/test/h5test.h
index 8e87192..c5254a7 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -101,7 +101,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
* spaces. If the h5_errors() is used for automatic error handling then
* the H5_FAILED() macro is invoked automatically when an API function fails.
*/
-#define TESTING(WHAT) {printf("Testing %-62s",WHAT); fflush(stdout);}
+#define TESTING(...) h5_testing(__VA_ARGS__);
#define TESTING_2(WHAT) {printf(" Testing %-62s",WHAT); fflush(stdout);}
#define PASSED() {puts(" PASSED");fflush(stdout);}
#define H5_FAILED() {puts("*FAILED*");fflush(stdout);}
@@ -126,6 +126,7 @@ extern "C" {
#endif
/* Generally useful testing routines */
+H5TEST_DLL void h5_testing(const char *, ...);
H5TEST_DLL void h5_clean_files(const char *base_name[], hid_t fapl);
H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl);
H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size);