summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2010-05-02 19:15:43 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2010-05-02 19:15:43 (GMT)
commit85ca829e712aa303e74806fc1d9af8b900fdbc4f (patch)
treef73d94650d485f7c90d88c61449eb770a7730efc /c++/test/h5cpputil.cpp
parent54cd6ecec92e81bdcac3299b844a61f14bc89d69 (diff)
downloadhdf5-85ca829e712aa303e74806fc1d9af8b900fdbc4f.zip
hdf5-85ca829e712aa303e74806fc1d9af8b900fdbc4f.tar.gz
hdf5-85ca829e712aa303e74806fc1d9af8b900fdbc4f.tar.bz2
[svn-r18685] Description:
Added missing overloaded function getObjTypeByIdx to return type name as a char*. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew)
Diffstat (limited to 'c++/test/h5cpputil.cpp')
-rw-r--r--c++/test/h5cpputil.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index 5e0f904..4485808 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -138,6 +138,43 @@ int check_values (hsize_t i, hsize_t j, int apoint, int acheck)
return 0;
} // check_values
+/*-------------------------------------------------------------------------
+ * Function: verify_val (const char*, const char*,...)
+ *
+ * Purpose: Compares two character strings. If they are
+ * different, the function will print out a message and the
+ * different values.
+ *
+ * Return: Success: 0
+ *
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * May 2, 2010
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void verify_val(const char* x, const char* value, const char* where, int line, const char* file_name)
+{
+ if (GetTestVerbosity()>=VERBO_HI)
+ {
+ cerr << endl;
+ cerr << " Call to routine: " << where << " at line " << line
+ << " in " << file_name << " had value " << x << endl;
+ }
+ if (strcmp(x, value) != 0)
+ {
+ cerr << endl;
+ cerr << "*** UNEXPECTED VALUE from " << where << " should be "
+ << value << ", but is " << x << " at line " << line
+ << " in " << file_name << endl;
+ IncTestNumErrs();
+ throw TestFailedException(where, "");
+ }
+}
+
//--------------------------------------------------------------------------
// Function: InvalidActionException default constructor
//--------------------------------------------------------------------------