summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/testh5repack_main.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-04-08 01:44:14 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-04-08 01:44:14 (GMT)
commit698f1af7cef2b2b471a8938d122fb44b2d94c0a2 (patch)
tree185c6ba6b8d578b4fd2649129474e85ce416c787 /tools/h5repack/testh5repack_main.c
parent791e811bb531964e5a5d72c40b5ab8faa2649836 (diff)
downloadhdf5-698f1af7cef2b2b471a8938d122fb44b2d94c0a2.zip
hdf5-698f1af7cef2b2b471a8938d122fb44b2d94c0a2.tar.gz
hdf5-698f1af7cef2b2b471a8938d122fb44b2d94c0a2.tar.bz2
[svn-r8320] Purpose:
new tests for h5repack Description: added more tests both to the test program and shell script that test a variation of different filter converssions Solution: Platforms tested: linux Misc. update:
Diffstat (limited to 'tools/h5repack/testh5repack_main.c')
-rw-r--r--tools/h5repack/testh5repack_main.c61
1 files changed, 60 insertions, 1 deletions
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c
index a008455..dbd6f58 100644
--- a/tools/h5repack/testh5repack_main.c
+++ b/tools/h5repack/testh5repack_main.c
@@ -702,7 +702,7 @@ int main (void)
PASSED();
- TESTING(" filter queue");
+ TESTING(" filter queue fletcher, shuffle, deflate, szip");
/*-------------------------------------------------------------------------
* add some filters
@@ -734,6 +734,65 @@ int main (void)
PASSED();
+ TESTING(" filter conversion from deflate to szip");
+/*-------------------------------------------------------------------------
+ * filter conversion from deflate to szip
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init (&pack_options, 0)<0)
+ TEST_ERROR;
+ if (h5repack_addfilter("dset_gzip:SZIP=8",&pack_options)<0)
+ TEST_ERROR;
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
+ TEST_ERROR;
+ if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
+ TEST_ERROR;
+ if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ TEST_ERROR;
+ if (h5repack_end (&pack_options)<0)
+ TEST_ERROR;
+ PASSED();
+
+ TESTING(" filter conversion from szip to deflate");
+/*-------------------------------------------------------------------------
+ * filter conversion from szip to deflate
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init (&pack_options, 0)<0)
+ TEST_ERROR;
+ if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
+ TEST_ERROR;
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
+ TEST_ERROR;
+ if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
+ TEST_ERROR;
+ if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ TEST_ERROR;
+ if (h5repack_end (&pack_options)<0)
+ TEST_ERROR;
+ PASSED();
+
+ TESTING(" filter conversion from 2 filters to 1 filter");
+/*-------------------------------------------------------------------------
+ * filter conversion from szip to deflate
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init (&pack_options, 0)<0)
+ TEST_ERROR;
+ if (h5repack_addfilter("dset_all:GZIP=1",&pack_options)<0)
+ TEST_ERROR;
+ if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
+ TEST_ERROR;
+ if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
+ TEST_ERROR;
+ if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ TEST_ERROR;
+ if (h5repack_end (&pack_options)<0)
+ TEST_ERROR;
+ PASSED();
+
+
+
puts("All h5repack tests passed.");
return 0;