summaryrefslogtreecommitdiffstats
path: root/c++/test/tfilter.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2007-03-17 16:26:53 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2007-03-17 16:26:53 (GMT)
commit1c4e6d163f781003ce1151781b3d403dc9b52e66 (patch)
treeb07834021d14510d51e90736877fd938c1a9d904 /c++/test/tfilter.cpp
parentc4bbce8be19cd60e7ffd0180194c0e0e92091381 (diff)
downloadhdf5-1c4e6d163f781003ce1151781b3d403dc9b52e66.zip
hdf5-1c4e6d163f781003ce1151781b3d403dc9b52e66.tar.gz
hdf5-1c4e6d163f781003ce1151781b3d403dc9b52e66.tar.bz2
[svn-r13524] Purpose: Cleanup tests
Description: Added extern "C" to cleanup functions as well, forgot last time. Cleaned up/Added comments to some of the newly added tests. Platforms tested AIX 5.1 (copper) Linux 2.6 (kagiso) SunOS 5.8 64-bit (sol)
Diffstat (limited to 'c++/test/tfilter.cpp')
-rw-r--r--c++/test/tfilter.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 2a9503a..1774cf2 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -113,13 +113,11 @@ filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
// Chunk dimensions
const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2};
-static void test_null_filter(void)
+static void test_null_filter()
{
// Output message about test being performed
SUBTEST("'Null' filter");
-
- try
- {
+ try {
hsize_t null_size; // Size of dataset with null filter
// Prepare dataset create property list
@@ -144,7 +142,7 @@ static void test_null_filter(void)
// catch all other exceptions
catch (Exception E)
{
- issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
+ issue_fail_msg("test_null_filter()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_null_filter
@@ -176,10 +174,10 @@ void test_szip_filter(H5File& file1)
// Output message about test being performed
SUBTEST("szip filter (with encoder)");
+
if ( h5_szip_can_encode() == 1) {
char* tconv_buf = new char [1000];
- try
- {
+ try {
const hsize_t size[2] = {DSET_DIM1, DSET_DIM2};
// Create the data space
@@ -222,14 +220,15 @@ void test_szip_filter(H5File& file1)
throw Exception("test_szip_filter", "Failed in testing szip method");
}
dsplist.close();
+ PASSED();
} // end of try
// catch all other exceptions
catch (Exception E)
{
- issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
+ issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg());
}
- }
+ } // if szip presents
else {
SKIPPED();
}
@@ -251,7 +250,7 @@ const H5std_string FILE1("tfilters.h5");
#ifdef __cplusplus
extern "C"
#endif
-void test_filters(void)
+void test_filters()
{
// Output message about test being performed
MESSAGE(5, ("Testing Various Filters\n"));
@@ -273,7 +272,7 @@ void test_filters(void)
}
catch (Exception E)
{
- issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
+ issue_fail_msg("test_filters()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_filters()
@@ -291,8 +290,10 @@ void test_filters(void)
*
*-------------------------------------------------------------------------
*/
-void
-cleanup_filters(void)
+#ifdef __cplusplus
+extern "C"
+#endif
+void cleanup_filters()
{
HDremove(FILE1.c_str());
}