diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-03-31 14:23:54 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-03-31 14:23:54 (GMT) |
commit | 310a684fc28d719c1ed4e67818a5810ad632e547 (patch) | |
tree | 009f27995fa0cc40f37a3c5c564f0ec78a0c5baa /test/testframe.c | |
parent | 0180863320994d8a7efba446f81bd73819315cd2 (diff) | |
download | hdf5-310a684fc28d719c1ed4e67818a5810ad632e547.zip hdf5-310a684fc28d719c1ed4e67818a5810ad632e547.tar.gz hdf5-310a684fc28d719c1ed4e67818a5810ad632e547.tar.bz2 |
[svn-r8290] Purpose:
Feature
Description:
Added to AddTest() a generic parameters pointer argument to
allow some extra parameters for some tests. E.g., test file
names can be customized during runtime and passed into the
test routines.
Platforms tested:
"h5committested".
Diffstat (limited to 'test/testframe.c')
-rw-r--r-- | test/testframe.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/testframe.c b/test/testframe.c index fb7100a..30f3df5 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -36,6 +36,7 @@ typedef struct TestStruct { char Name[MAXTESTNAME]; void (*Call)(void); void (*Cleanup)(void); + void *Parameters; } TestStruct; @@ -51,9 +52,15 @@ static int Index = 0; /* * Setup a test function and add it to the list of tests. * It must have no parameters and returns void. + * TheName--short test name + * TheCall--the test routine + * Cleanup--the cleanup routine for the test + * TheDescr--Long description of the test + * Parameters--pointer to extra parameters. Use NULL if none used. + * Since only the pointer is copied, the contents should not change. */ void -AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr) +AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr, const void *Parameters) { /* Sanity checking */ if (Index >= MAXNUMOFTESTS) { @@ -79,6 +86,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con Test[Index].Cleanup = Cleanup; Test[Index].NumErrors = -1; Test[Index].SkipFlag = 0; + Test[Index].Parameters = Parameters; /* Increment test count */ Index++; |