diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2004-01-05 21:58:37 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2004-01-05 21:58:37 (GMT) |
commit | dc458e5f6f7f4ea69644653aa3f348d2f6eb9d53 (patch) | |
tree | a5757b2575f4116a6470d242a94c5a612b1e7924 /test/testhdf5.c | |
parent | e076771380e248497a7dd8eac37319a030c99db6 (diff) | |
download | hdf5-dc458e5f6f7f4ea69644653aa3f348d2f6eb9d53.zip hdf5-dc458e5f6f7f4ea69644653aa3f348d2f6eb9d53.tar.gz hdf5-dc458e5f6f7f4ea69644653aa3f348d2f6eb9d53.tar.bz2 |
[svn-r8017] Purpose:
Code reorg.
Description:
Move the InitTest() from individual tests (testhdf5 and ttsafe) to
libh5test (h5test.c) so that it can be shared among all tests.
Platforms tested:
Only tested in Eirene via serial with thread-safe enabled.
No other platforms test since this is pretty trivial.
Diffstat (limited to 'test/testhdf5.c')
-rw-r--r-- | test/testhdf5.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/test/testhdf5.c b/test/testhdf5.c index 1fd2f34..58eacbe 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -38,12 +38,11 @@ */ #include <stdarg.h> +#include "h5test.h" #define MAXNUMOFTESTS 30 #define HDF5_TEST_MASTER -/* Internal Variables */ -static int Index = 0; /* Global variables */ int num_errs = 0; @@ -52,35 +51,12 @@ int Verbosity; /* ANY new test needs to have a prototype in tproto.h */ #include "testhdf5.h" -struct TestStruct { - int NumErrors; - char Description[64]; - int SkipFlag; - char Name[16]; - void (*Call) (void); - void (*Cleanup) (void); -} Test[MAXNUMOFTESTS]; +struct TestStruct Test[MAXNUMOFTESTS]; +int Index = 0; -static void InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr); static void usage(void); static void -InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr) -{ - if (Index >= MAXNUMOFTESTS) { - print_func("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++; -} - -static void usage(void) { int i; |