From eb3e5b8144979c653d12c56790e4efb3cafdd11b Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 14 Apr 2003 06:21:18 -0500 Subject: [PATCH] [svn-r6664] Purpose: Code cleanup Description: Added macro for reporting line #'s of test failures more easily. Platforms tested: FreeBSD 4.8 (sleipnir) w/C++ Linux 2.4 (burrwhite) w/FORTRAN Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/parallel & FORTRAN (h5committest not run due to my ongoing difficulties with C++ on burrwhite). --- test/h5test.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/h5test.h b/test/h5test.h index aa5ded30e9..cceaa30e9c 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -41,6 +41,12 @@ extern char *paraprefix; extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ #endif +/* + * Print the current location on the standard output stream. + */ +#define AT() printf (" at %s:%d in %s()...\n", \ + __FILE__, __LINE__, __FUNCTION__); + /* * The name of the test is printed by saying TESTING("something") which will * result in the string `Testing something' being flushed to standard output. @@ -54,12 +60,7 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ #define PASSED() {puts(" PASSED");fflush(stdout);} #define H5_FAILED() {puts("*FAILED*");fflush(stdout);} #define SKIPPED() {puts(" -SKIP-");fflush(stdout);} - -/* - * Print the current location on the standard output stream. - */ -#define AT() printf (" at %s:%d in %s()...\n", \ - __FILE__, __LINE__, __FUNCTION__); +#define TEST_ERROR {H5_FAILED(); AT(); goto error;} #ifdef __cplusplus