diff options
Diffstat (limited to 'test/testhdf5.h')
-rw-r--r-- | test/testhdf5.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/test/testhdf5.h b/test/testhdf5.h index f5e51e3..156aa78 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -16,8 +16,8 @@ * This header file contains information required for testing the HDF5 library. */ -#ifndef HDF5TEST_H -#define HDF5TEST_H +#ifndef TESTHDF5_H +#define TESTHDF5_H /* * Include required headers. This file tests internal library functions, @@ -26,7 +26,14 @@ #include "H5private.h" #include "H5Eprivate.h" -#ifndef HDF5_TEST_MASTER +/* Include generic testing header also */ +#include "h5test.h" + +#ifdef HDF5_TEST_MASTER +/* Global variables */ +int num_errs = 0; +int Verbosity = 4; /* Default Verbosity is Low */ +#else /* HDF5_TEST_MASTER */ extern int num_errs; extern int Verbosity; #endif /* HDF5_TEST_MASTER */ @@ -45,7 +52,6 @@ extern int Verbosity; num_errs++; \ H5Eprint (stdout); \ } \ - H5Eclear(); \ } while(0) #define CHECK_I(ret,where) { \ @@ -59,7 +65,6 @@ extern int Verbosity; H5Eprint (stdout); \ num_errs++; \ } \ - H5Eclear (); \ } #define CHECK_PTR(ret,where) { \ @@ -73,7 +78,6 @@ extern int Verbosity; H5Eprint (stdout); \ num_errs++; \ } \ - H5Eclear (); \ } /* Used to make certain a return value _is_ a value */ @@ -88,7 +92,6 @@ extern int Verbosity; H5Eprint (stdout); \ num_errs++; \ } \ - H5Eclear(); \ } while(0) /* Used to document process through a test and to check for errors */ @@ -97,14 +100,13 @@ extern int Verbosity; print_func(" Call to routine: %15s at line %4d in %s returned " \ "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \ } \ - if (Verbosity>9) HEprint(stdout, 0); \ + if (Verbosity>9) HEEprint(stdout); \ if ((ret) == FAIL) { \ print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \ H5Eprint (stdout); \ num_errs++; \ } \ - H5Eclear(); \ } while(0) #else @@ -119,7 +121,6 @@ extern int Verbosity; num_errs++; \ H5Eprint (H5E_DEFAULT, stdout); \ } \ - H5Eclear(H5E_DEFAULT); \ } while(0) #define CHECK_I(ret,where) { \ @@ -133,7 +134,6 @@ extern int Verbosity; H5Eprint (H5E_DEFAULT, stdout); \ num_errs++; \ } \ - H5Eclear (H5E_DEFAULT); \ } #define CHECK_PTR(ret,where) { \ @@ -147,7 +147,6 @@ extern int Verbosity; H5Eprint (H5E_DEFAULT, stdout); \ num_errs++; \ } \ - H5Eclear (H5E_DEFAULT); \ } /* Used to make certain a return value _is_ a value */ @@ -162,7 +161,6 @@ extern int Verbosity; H5Eprint (H5E_DEFAULT, stdout); \ num_errs++; \ } \ - H5Eclear(H5E_DEFAULT); \ } while(0) /* Used to document process through a test and to check for errors */ @@ -171,14 +169,13 @@ extern int Verbosity; print_func(" Call to routine: %15s at line %4d in %s returned " \ "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \ } \ - if (Verbosity>9) HEprint(stdout, 0); \ + if (Verbosity>9) H5Eprint(H5E_DEFAULT, stdout); \ if ((ret) == FAIL) { \ print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \ H5Eprint (H5E_DEFAULT, stdout); \ num_errs++; \ } \ - H5Eclear(H5E_DEFAULT); \ } while(0) #endif /* H5_WANT_H5_V1_6_COMPAT */ @@ -192,8 +189,16 @@ extern int Verbosity; #define TEST_STR "Test" #define CLEAN_STR "Cleanup" -/* Prototypes for the support routines */ -int print_func(const char *,...); +/* Routines for operating on the list of tests (for the "all in one" tests) */ +H5TEST_DLL void TestUsage(void); +H5TEST_DLL void AddTest(const char *TheName, void (*TheCall) (void), + void (*Cleanup) (void), const char *TheDescr); +H5TEST_DLL void TestInfo(const char *ProgName); +H5TEST_DLL void TestParseCmdLine(int argc, char *argv[], int *Summary, int *CleanUp); +H5TEST_DLL void PerformTests(void); +H5TEST_DLL void TestSummary(void); +H5TEST_DLL void TestCleanup(void); +H5TEST_DLL void TestInit(void); /* Prototypes for the test routines */ void test_metadata(void); @@ -233,4 +238,4 @@ void cleanup_genprop(void); void cleanup_configure(void); void cleanup_misc(void); -#endif /* HDF5cleanup_H */ +#endif /* TESTHDF5_H */ |