summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-11-20 13:19:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-11-20 13:19:37 (GMT)
commitb5e3e19f860a8ca0ebd4b7149f99a725c9d67f9f (patch)
tree9232a64dc1cd7ec5da0d231198a71ded182984c4 /test/tmisc.c
parentac48a23e2b72b03d60d4fdf10957ed31beb5b70d (diff)
downloadhdf5-b5e3e19f860a8ca0ebd4b7149f99a725c9d67f9f.zip
hdf5-b5e3e19f860a8ca0ebd4b7149f99a725c9d67f9f.tar.gz
hdf5-b5e3e19f860a8ca0ebd4b7149f99a725c9d67f9f.tar.bz2
[svn-r6115] Purpose:
Code Cleanup & New Tests Description: tmisc.c: Switched from using H5_HAVE_COMPRESSION flag in favor of H5_HAVE_FILTER_DEFLATE. dsets.c: Switched from using H5_HAVE_COMPRESSION flag in favor of H5_HAVE_FILTER_DEFLATE. Refactored I/O filter tests to allow new filters to be [more] easily added. Added tests for shuffle & deflate+shuffle I/O filters (if the filter(s) are enabled). Added test for creating a new dataset with a filter that is not available. Added test for attempting to read a dataset created with a filter that is not available. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir)
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index da31f43..6d86983 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1343,10 +1343,10 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Use compression as well as chunking for these datasets */
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
ret = H5Pset_deflate(dcpl,9);
CHECK(ret, FAIL, "H5Pset_deflate");
-#endif /* end H5_HAVE_COMPRESSION */
+#endif /* end H5_HAVE_FILTER_DEFLATE */
/* Create a chunked dataset, with space allocation early */
did = H5Dcreate(fid, MISC8_DSETNAME8, H5T_NATIVE_INT, sid, dcpl);
@@ -1359,7 +1359,7 @@ test_misc8(void)
/* Check the storage size after data is written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
if(storage_size>=(MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT))) {
num_errs++;
printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size);
@@ -1369,7 +1369,7 @@ test_misc8(void)
num_errs++;
printf("Error on line %d: wrong storage size! storage_size=%u\n",__LINE__,(unsigned)storage_size);
}
-#endif /* H5_HAVE_COMPRESSION */
+#endif /* H5_HAVE_FILTER_DEFLATE */
/* Close dataset ID */
ret = H5Dclose(did);
@@ -1395,7 +1395,7 @@ test_misc8(void)
/* Check the storage size after only four chunks are written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
if(storage_size>=(MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT))) {
num_errs++;
printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size);
@@ -1405,7 +1405,7 @@ test_misc8(void)
num_errs++;
printf("Error on line %d: wrong storage size! storage_size=%u\n",__LINE__,(unsigned)storage_size);
}
-#endif /* H5_HAVE_COMPRESSION */
+#endif /* H5_HAVE_FILTER_DEFLATE */
/* Write entire dataset */
ret = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
@@ -1430,7 +1430,7 @@ test_misc8(void)
/* Check the storage size after data is written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
if(storage_size>=(MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT))) {
num_errs++;
printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size);
@@ -1440,7 +1440,7 @@ test_misc8(void)
num_errs++;
printf("Error on line %d: wrong storage size! storage_size=%u\n",__LINE__,(unsigned)storage_size);
}
-#endif /*H5_HAVE_COMPRESSION*/
+#endif /*H5_HAVE_FILTER_DEFLATE*/
/* Close dataset ID */
ret = H5Dclose(did);
@@ -1465,7 +1465,7 @@ test_misc8(void)
/* Check the storage size after only four chunks are written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
if(storage_size>=(4*MISC8_CHUNK_DIM0*MISC8_CHUNK_DIM1*H5Tget_size(H5T_NATIVE_INT))) {
num_errs++;
printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size);
@@ -1475,7 +1475,7 @@ test_misc8(void)
num_errs++;
printf("Error on line %d: wrong storage size! storage_size=%u\n",__LINE__,(unsigned)storage_size);
}
-#endif /* H5_HAVE_COMPRESSION */
+#endif /* H5_HAVE_FILTER_DEFLATE */
/* Write entire dataset */
ret = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
@@ -1500,7 +1500,7 @@ test_misc8(void)
/* Check the storage size after data is written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
-#ifdef H5_HAVE_COMPRESSION
+#ifdef H5_HAVE_FILTER_DEFLATE
if(storage_size>=(MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT))) {
num_errs++;
printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size);
@@ -1510,7 +1510,7 @@ test_misc8(void)
num_errs++;
printf("Error on line %d: wrong storage size! storage_size=%u\n",__LINE__,(unsigned)storage_size);
}
-#endif /*H5_HAVE_COMPRESSION*/
+#endif /*H5_HAVE_FILTER_DEFLATE*/
/* Close dataset ID */
ret = H5Dclose(did);