summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2005-03-20 04:01:25 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2005-03-20 04:01:25 (GMT)
commit99d26d20f83ab0ae3122b77a2efa2d617ba99769 (patch)
tree925f3dc655ad2e165bd5b4544340659551c310da /c++/test/h5cpputil.h
parentfef46461796180cb5a920f42296969a6b8ab3564 (diff)
downloadhdf5-99d26d20f83ab0ae3122b77a2efa2d617ba99769.zip
hdf5-99d26d20f83ab0ae3122b77a2efa2d617ba99769.tar.gz
hdf5-99d26d20f83ab0ae3122b77a2efa2d617ba99769.tar.bz2
[svn-r10242] Purpose: Updating C++ tests
Description: Added an overloaded function for the template function verify_val. Updated various comments/headers. Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper)
Diffstat (limited to 'c++/test/h5cpputil.h')
-rw-r--r--c++/test/h5cpputil.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index bef8f4a..38ecbcb 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -23,6 +23,8 @@
#ifndef _h5cpputil_h
#define _h5cpputil_h
+#include "h5test.h"
+
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif
@@ -51,7 +53,19 @@ template <class Type1, class Type2>
cerr << "*** UNEXPECTED VALUE from " << where << " should be "
<< value << ", but is " << x << " at line " << line
<< " in " << file_name << endl;
- H5Eprint (stderr);
+ IncTestNumErrs();
+ }
+}
+
+template <class Type1, class Type2>
+ void verify_val(Type1 x, Type2 value, const char* msg, const char* file_name, int line)
+{
+ if (x != value)
+ {
+ cerr << "*** UNEXPECTED VALUE: " << file_name << ":line " << line
+ << ":" << msg << " different: " << x << ", should be " << value
+ << endl;
+ IncTestNumErrs();
}
}