summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2004-12-20 20:01:46 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2004-12-20 20:01:46 (GMT)
commit625e6ad9aa105bdcc50e6d42559a56582b867e37 (patch)
tree470e5d4efbd7e68f2c52535ada2c2c19d07c0af5 /c++/test/h5cpputil.cpp
parente793077523917ba58eb138b5369ae7dc19d84ba1 (diff)
downloadhdf5-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.cpp')
-rw-r--r--c++/test/h5cpputil.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index 85ba2d2..020bab0 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -31,8 +31,8 @@
using namespace std;
#endif
-#include "h5cpputil.h"
#include "h5test.h"
+#include "h5cpputil.h"
/*-------------------------------------------------------------------------
* Function: test_report
@@ -58,16 +58,39 @@ int test_report( int nerrors, const string& testname )
{
nerrors = MAX(1, nerrors);
if (1 == nerrors)
- cout << "***** " << nerrors << testname
+ cerr << "***** " << nerrors << testname
<< " TEST FAILED! *****" << endl;
else
- cout << "***** " << nerrors << testname
+ cerr << "***** " << nerrors << testname
<< " TESTS FAILED! *****" << endl;
return 1;
}
else
{
- cout << "All" << testname << " tests passed." << endl;
+ cerr << "All" << testname << " tests passed." << endl;
return 0;
}
}
+
+/*-------------------------------------------------------------------------
+ * Function: issue_fail_msg
+ *
+ * Purpose: Displays that a function has failed with its location.
+ *
+ * Return: None
+ *
+ * Programmer: Binh-Minh Ribler (copied and modified macro CHECK from C)
+ * Monday, December 20, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+void issue_fail_msg(const char* where, int line, const char* file_name)
+{
+ if (GetTestVerbosity()>=VERBO_HI)
+ {
+ cerr << " Call to routine: " << where << " at line " << line
+ << " in " << file_name << "has failed" << endl;
+ }
+}
+
+