summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/h5test.h18
-rw-r--r--test/testhdf5.h24
2 files changed, 22 insertions, 20 deletions
diff --git a/test/h5test.h b/test/h5test.h
index 315b504..61e7d95 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -61,11 +61,16 @@
* Verbose queries
* Only None needs an exact match. The rest are at least as much.
*/
-#define VERBOSE_NONE (GetTestVerbosity()==VERBO_NONE)
-#define VERBOSE_DEF (GetTestVerbosity()>=VERBO_DEF)
-#define VERBOSE_LO (GetTestVerbosity()>=VERBO_LO)
-#define VERBOSE_MED (GetTestVerbosity()>=VERBO_MED)
-#define VERBOSE_HI (GetTestVerbosity()>=VERBO_HI)
+
+/* A macro version of HDGetTestVerbosity(). */
+/* Should be used internally by the libtest.a only. */
+#define HDGetTestVerbosity() (TestVerbosity)
+
+#define VERBOSE_NONE (HDGetTestVerbosity()==VERBO_NONE)
+#define VERBOSE_DEF (HDGetTestVerbosity()>=VERBO_DEF)
+#define VERBOSE_LO (HDGetTestVerbosity()>=VERBO_LO)
+#define VERBOSE_MED (HDGetTestVerbosity()>=VERBO_MED)
+#define VERBOSE_HI (HDGetTestVerbosity()>=VERBO_HI)
/*
* Test controls definitions.
@@ -189,6 +194,9 @@ H5TEST_DLL void h5_dump_info_object(MPI_Info info);
H5TEST_DLL char* getenv_all(MPI_Comm comm, int root, const char* name);
#endif
+/* Extern global variables */
+H5TEST_DLLVAR int TestVerbosity;
+
#ifdef __cplusplus
}
#endif
diff --git a/test/testhdf5.h b/test/testhdf5.h
index adac3fe..3aefa0c 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -25,18 +25,15 @@
* so we include the private headers here.
*/
#include "H5private.h"
+#include "H5Eprivate.h"
/* Include generic testing header also */
#include "h5test.h"
-/* A macro version of HDGetTestVerbosity(). */
-/* Should be used internally by the libtest.a only. */
-#define HDGetTestVerbosity() (TestVerbosity)
-
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
#define CHECK(ret, val, where) do { \
- if (HDGetTestVerbosity()>=VERBO_HI) print_func(" Call to routine: %15s at line %4d " \
+ if (VERBOSE_HI) print_func(" Call to routine: %15s at line %4d " \
"in %s returned %ld \n", \
where, (int)__LINE__, __FILE__, \
(long)(ret)); \
@@ -48,7 +45,7 @@
} while(0)
#define CHECK_I(ret,where) { \
- if (HDGetTestVerbosity()>=VERBO_HI) { \
+ if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", \
(where), (int)__LINE__, __FILE__, (long)(ret)); \
} \
@@ -60,7 +57,7 @@
}
#define CHECK_PTR(ret,where) { \
- if (HDGetTestVerbosity()>=VERBO_HI) { \
+ if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
(where), (int)__LINE__, __FILE__, (ret)); \
} \
@@ -74,7 +71,7 @@
/* Used to make certain a return value _is_ a value */
#define VERIFY(_x, _val, where) do { \
long __x = (long)_x, __val = (long)_val; \
- if(HDGetTestVerbosity() >= VERBO_HI) { \
+ if(VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s had value " \
"%ld \n", (where), (int)__LINE__, __FILE__, __x); \
} \
@@ -88,7 +85,7 @@
/* Used to make certain a (non-'long' type's) return value _is_ a value */
#define VERIFY_TYPE(_x, _val, _type, _format, where) do { \
_type __x = (_type)_x, __val = (_type)_val; \
- if(HDGetTestVerbosity() >= VERBO_HI) { \
+ if(VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s had value " \
_format " \n", (where), (int)__LINE__, __FILE__, __x); \
} \
@@ -101,7 +98,7 @@
/* Used to make certain a string return value _is_ a value */
#define VERIFY_STR(x, val, where) do { \
- if (HDGetTestVerbosity()>=VERBO_HI) { \
+ if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s had value " \
"%s \n", (where), (int)__LINE__, __FILE__, x); \
} \
@@ -114,11 +111,11 @@
/* Used to document process through a test and to check for errors */
#define RESULT(ret,func) do { \
- if (HDGetTestVerbosity()>VERBO_MED) { \
+ if (VERBOSE_MED) { \
print_func(" Call to routine: %15s at line %4d in %s returned " \
"%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \
} \
- if (HDGetTestVerbosity()>=VERBO_HI) \
+ if (VERBOSE_HI) \
H5Eprint2(H5E_DEFAULT, stdout); \
if ((ret) == FAIL) { \
TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
@@ -189,9 +186,6 @@ void cleanup_sohm(void);
void cleanup_misc(void);
void cleanup_unicode(void);
-/* Extern global variables */
-extern int TestVerbosity;
-
#ifdef __cplusplus
}
#endif