summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/h5test.c b/test/h5test.c
index a361bcc..87a8a0b 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -796,3 +796,23 @@ 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.
+ */
+void
+InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr)
+{
+ if (Index >= MAXNUMOFTESTS) {
+ printf("Uh-oh, too many tests added, increase MAXNUMOFTEST!\n");
+ 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++;
+}
+