summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-30 14:52:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-30 14:52:51 (GMT)
commita56a1205d25b9184d628a30886ed4a0801d3ec94 (patch)
treec391dc85223eb9f95bf4d6862795903044ce1690 /test
parent11631664fd46f16acdee324a07851f47480db0c9 (diff)
downloadhdf5-a56a1205d25b9184d628a30886ed4a0801d3ec94.zip
hdf5-a56a1205d25b9184d628a30886ed4a0801d3ec94.tar.gz
hdf5-a56a1205d25b9184d628a30886ed4a0801d3ec94.tar.bz2
[svn-r9732] Purpose:
Bug fix Description: szip tests were failing due to a few "H5_SZIP_CAN_ENCODE" ifdefs still lying around in the source code. Solution: Eliminate compile time testing by using new SZ_encoder_enabled() routine at run time. Platforms tested: FreeBSD 4.10 (sleipnir) w/szip
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 802fc87..afce193 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -23,6 +23,9 @@
#include <time.h>
#include "h5test.h"
+#ifdef H5_HAVE_SZLIB_H
+# include "szlib.h"
+#endif
/*
* This file needs to access private datatypes from the H5Z package.
@@ -1797,17 +1800,18 @@ test_get_filter_info(void)
#endif
#ifdef H5_HAVE_FILTER_SZIP
- if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
-
-#ifdef H5_SZIP_CAN_ENCODE
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
- ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
- TEST_ERROR
-#else
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
- ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
- TEST_ERROR
-#endif /* H5_SZIP_CAN_ENCODE */
+ if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
+
+ if(SZ_encoder_enabled()) {
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
+ TEST_ERROR
+ } /* end if */
+ else {
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
+ ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
+ TEST_ERROR
+ } /* end else */
#endif /* H5_HAVE_FILTER_SZIP */
/* Verify that get_filter_info throws an error when given a bad filter */