summaryrefslogtreecommitdiffstats
path: root/test/testhdf5.h
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-09-01 17:43:30 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-09-01 17:43:30 (GMT)
commitcb7f03a26ff906175e5bf37af57547681683770f (patch)
treed8d167353c83fe6caebc6df15c33ca1c7f6dc521 /test/testhdf5.h
parent226f162ce75ff63e3d1468d17528ba629c51db58 (diff)
downloadhdf5-cb7f03a26ff906175e5bf37af57547681683770f.zip
hdf5-cb7f03a26ff906175e5bf37af57547681683770f.tar.gz
hdf5-cb7f03a26ff906175e5bf37af57547681683770f.tar.bz2
[svn-r9183] Purpose: New feature
Description: Restore 6 old error API functions back to the library to be backward compatible with v1.6. They are H5Epush, H5Eprint, H5Ewalk, H5Eclear, H5Eset_auto, H5Eget_auto. These functions do not have error stack as parameter. Solution: Internally, these functions use default error stack. Platforms tested: h5committest and fuss. Misc. update: RELEASE.txt
Diffstat (limited to 'test/testhdf5.h')
-rw-r--r--test/testhdf5.h88
1 files changed, 10 insertions, 78 deletions
diff --git a/test/testhdf5.h b/test/testhdf5.h
index f01a32e..e00f56d 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -31,7 +31,6 @@
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
-#ifdef H5_WANT_H5_V1_6_COMPAT
#define CHECK(ret, val, where) do { \
if (GetTestVerbosity()>=VERBO_HI) print_func(" Call to routine: %15s at line %4d " \
"in %s returned %ld \n", \
@@ -40,7 +39,7 @@
if ((ret) == (val)) { \
TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
"in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (stdout); \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
} \
} while(0)
@@ -52,117 +51,50 @@
if ((ret)<0) { \
TestErrPrintf ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
(where), (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (stdout); \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
} \
}
#define CHECK_PTR(ret,where) { \
- if (GetTestVerbosity()>=VERBO_HI) { \
+ if (GetTestVerbosity()>=VERBO_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
(where), (int)__LINE__, __FILE__, (ret)); \
} \
if (!(ret)) { \
TestErrPrintf ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
(where), (int)__LINE__, __FILE__); \
- H5Eprint (stdout); \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
} \
}
/* Used to make certain a return value _is_ a value */
#define VERIFY(x, val, where) do { \
- if (GetTestVerbosity()>=VERBO_HI) { \
+ if (GetTestVerbosity()>=VERBO_HI) { \
print_func(" Call to routine: %15s at line %4d in %s had value " \
"%ld \n", (where), (int)__LINE__, __FILE__, (long)(x)); \
} \
if ((x) != (val)) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %ld, but is %ld at line %4d " \
"in %s\n", (where), (long)(val), (long)(x), (int)__LINE__, __FILE__); \
- H5Eprint (stdout); \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
} \
} while(0)
/* Used to document process through a test and to check for errors */
#define RESULT(ret,func) do { \
- if (GetTestVerbosity()>VERBO_MED) { \
+ if (GetTestVerbosity()>VERBO_MED) { \
print_func(" Call to routine: %15s at line %4d in %s returned " \
"%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \
} \
- if (GetTestVerbosity()>=VERBO_HI) \
- H5Eprint(stdout); \
+ if (GetTestVerbosity()>=VERBO_HI) \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
if ((ret) == FAIL) { \
TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
"in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (stdout); \
+ H5Eprint_stack(H5E_DEFAULT, stdout); \
} \
} while(0)
-#else
-#define CHECK(ret, val, where) do { \
- if (GetTestVerbosity()>=VERBO_HI) print_func(" Call to routine: %15s at line %4d " \
- "in %s returned %ld \n", \
- where, (int)__LINE__, __FILE__, \
- (long)(ret)); \
- if ((ret) == (val)) { \
- TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
- "in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (H5E_DEFAULT, stdout); \
- } \
-} while(0)
-
-#define CHECK_I(ret,where) { \
- if (GetTestVerbosity()>=VERBO_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", \
- (where), (int)__LINE__, __FILE__, (long)(ret)); \
- } \
- if ((ret)<0) { \
- TestErrPrintf ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
- (where), (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (H5E_DEFAULT, stdout); \
- } \
-}
-
-#define CHECK_PTR(ret,where) { \
- if (GetTestVerbosity()>=VERBO_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
- (where), (int)__LINE__, __FILE__, (ret)); \
- } \
- if (!(ret)) { \
- TestErrPrintf ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
- (where), (int)__LINE__, __FILE__); \
- H5Eprint (H5E_DEFAULT, stdout); \
- } \
-}
-
-/* Used to make certain a return value _is_ a value */
-#define VERIFY(x, val, where) do { \
- if (GetTestVerbosity()>=VERBO_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s had value " \
- "%ld \n", (where), (int)__LINE__, __FILE__, (long)(x)); \
- } \
- if ((x) != (val)) { \
- TestErrPrintf("*** UNEXPECTED VALUE from %s should be %ld, but is %ld at line %4d " \
- "in %s\n", (where), (long)(val), (long)(x), (int)__LINE__, __FILE__); \
- H5Eprint (H5E_DEFAULT, stdout); \
- } \
-} while(0)
-
-/* Used to document process through a test and to check for errors */
-#define RESULT(ret,func) do { \
- if (GetTestVerbosity()>VERBO_MED) { \
- print_func(" Call to routine: %15s at line %4d in %s returned " \
- "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \
- } \
- if (GetTestVerbosity()>=VERBO_HI) \
- H5Eprint(H5E_DEFAULT, stdout); \
- if ((ret) == FAIL) { \
- TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
- "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint (H5E_DEFAULT, stdout); \
- } \
-} while(0)
-
-#endif /* H5_WANT_H5_V1_6_COMPAT */
-
/* Used to document process through a test */
#define MESSAGE(V,A) {if (GetTestVerbosity()>(V)) print_func A;}