diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-03-30 23:35:16 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-03-30 23:35:16 (GMT) |
commit | d7a5f94d66390f2a777e51dba2e781d7f84e0656 (patch) | |
tree | 2db9623a283851a7273b2d01096f45c06c6a3d30 /test/testframe.c | |
parent | c3d9b510b4e65cd32ec9708fd369d31b77d76ea6 (diff) | |
download | hdf5-d7a5f94d66390f2a777e51dba2e781d7f84e0656.zip hdf5-d7a5f94d66390f2a777e51dba2e781d7f84e0656.tar.gz hdf5-d7a5f94d66390f2a777e51dba2e781d7f84e0656.tar.bz2 |
[svn-r8289] 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".
Also run compat test in eirene.
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 1952ef5..f99a15f 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++; |