summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2007-01-26 05:40:17 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2007-01-26 05:40:17 (GMT)
commitfd318bcf1fe96ff30ae83a4a1441d2600f0cf825 (patch)
treec74c83e7815461c4ce8dce5de46c5a60c01d0943 /c++/test/h5cpputil.h
parent134352c456b2952f192e74ed3e87fb72a2d9bbd8 (diff)
downloadhdf5-fd318bcf1fe96ff30ae83a4a1441d2600f0cf825.zip
hdf5-fd318bcf1fe96ff30ae83a4a1441d2600f0cf825.tar.gz
hdf5-fd318bcf1fe96ff30ae83a4a1441d2600f0cf825.tar.bz2
[svn-r13201] Purpose: Adding test
Description: Added * tests for some generic datatype operations * tests for compound datatype operations These tests are checked in now to make sure they're safe! They can use some more comments and minor cleanups. Will do very soon. Fixed few minor typos. Platforms tested AIX 5.1 (copper) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia)
Diffstat (limited to 'c++/test/h5cpputil.h')
-rw-r--r--c++/test/h5cpputil.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index 0173d2f..7aa77a9 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -34,8 +34,9 @@ using std::cerr;
using std::endl;
#endif
-int test_report (int, const H5std_string&);
+#define SUBTEST(WHAT) {printf(" Subtest: %-52s",WHAT); fflush(stdout);}
+int test_report (int, const H5std_string&);
void issue_fail_msg(const char* where, int line, const char* file_name,
const char* message="");
@@ -68,6 +69,22 @@ template <class Type1, class Type2>
}
}
+template <class Type1, class Type2>
+ void verify_val_noteq(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 not be "
+ << value << " at line " << line << " in " << file_name << endl;
+ IncTestNumErrs();
+ }
+}
+
class InvalidActionException : public Exception {
public:
InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG);
@@ -75,4 +92,31 @@ class InvalidActionException : public Exception {
virtual ~InvalidActionException();
};
+/* Prototypes for the test routines */
+void test_attr(void);
+void test_compound(void);
+void test_file(void);
+void test_h5s(void);
+void test_reference(void);
+void test_types(void);
+void test_vlstrings(void);
+
+/* Prototypes for the cleanup routines */
+void cleanup_attr(void);
+void cleanup_compound(void);
+void cleanup_file(void);
+void cleanup_h5s(void);
+void cleanup_reference(void);
+void cleanup_types(void);
+void cleanup_vlstrings(void);
+/* not yet
+void cleanup_select(void);
+void cleanup_time(void);
+void cleanup_vltypes(void);
+void cleanup_iterate(void);
+void cleanup_array(void);
+void cleanup_genprop(void);
+void cleanup_misc(void);
+*/
+
#endif