summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 79c9da8..3a8e72c 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -89,14 +89,6 @@ MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
*/
static const char *multi_letters = "msbrglo";
-/*
- * Global variables used by InitTest().
- * The code should be revised so that these do not need to be
- * global.
- */
-struct TestStruct Test[MAXNUMOFTESTS];
-int Index = 0;
-
#ifdef H5_WANT_H5_V1_6_COMPAT
static herr_t h5_errors(void *client_data);
#else /* H5_WANT_H5_V1_6_COMPAT */
@@ -804,24 +796,20 @@ h5_get_file_size(const char *filename)
return(0);
} /* end get_file_size() */
-
/*
- * Setup a test function. It must have no parameters and returns void.
+ * This routine is designed to provide equivalent functionality to 'printf'
+ * and allow easy replacement for environments which don't have stdin/stdout
+ * available. (i.e. Windows & the Mac)
*/
-void
-InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr)
+int
+print_func(const char *format, ...)
{
- if (Index >= MAXNUMOFTESTS) {
- printf("Too many tests added, increase MAXNUMOFTEST(%d).\n",
- MAXNUMOFTESTS);
- exit(-1);
- } /* end if */
- HDstrcpy(Test[Index].Description, TheDescr);
- HDstrcpy(Test[Index].Name, TheName);
- Test[Index].Call = TheCall;
- Test[Index].Cleanup = Cleanup;
- Test[Index].NumErrors = -1;
- Test[Index].SkipFlag = 0;
- Index++;
+ va_list arglist;
+ int ret_value;
+
+ va_start(arglist, format);
+ ret_value = vprintf(format, arglist);
+ va_end(arglist);
+ return ret_value;
}