diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-12-20 20:01:46 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-12-20 20:01:46 (GMT) |
commit | 625e6ad9aa105bdcc50e6d42559a56582b867e37 (patch) | |
tree | 470e5d4efbd7e68f2c52535ada2c2c19d07c0af5 /c++/test/h5cpputil.h | |
parent | e793077523917ba58eb138b5369ae7dc19d84ba1 (diff) | |
download | hdf5-625e6ad9aa105bdcc50e6d42559a56582b867e37.zip hdf5-625e6ad9aa105bdcc50e6d42559a56582b867e37.tar.gz hdf5-625e6ad9aa105bdcc50e6d42559a56582b867e37.tar.bz2 |
[svn-r9696] Purpose: Clean up tests
Description:
Replaced cout's with cerr's.
Replaced macro VERIFY with template function verify_val to
verify read data/info.
Cleanup various places in the tests to make them more consistent.
Platforms tested:
SunOS 5.7 (arabica)
Linux 2.4 (eirene)
Diffstat (limited to 'c++/test/h5cpputil.h')
-rw-r--r-- | c++/test/h5cpputil.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index b3d7a1b..d67c459 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -25,8 +25,29 @@ #ifndef H5_NO_STD int test_report (int, const std::string&); +using std::cerr; +using std::endl; #else int test_report (int, const string&); #endif +void issue_fail_msg(const char* where, int line, const char* file_name); + +template <class Type1, class Type2> + void verify_val(Type1 x, Type2 value, const char* where, int line, const char* file_name) +{ + if (GetTestVerbosity()>=VERBO_HI) + { + cerr << " Call to routine: " << where << " at line " << line + << " in " << file_name << " had value " << x << endl; + } + if (x != value) + { + cerr << "*** UNEXPECTED VALUE from " << where << " should be " + << value << ", but is " << x << " at line " << line + << " in " << file_name << endl; + H5Eprint (stdout); + } +} + #endif |