diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-04-08 01:44:14 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-04-08 01:44:14 (GMT) |
commit | 698f1af7cef2b2b471a8938d122fb44b2d94c0a2 (patch) | |
tree | 185c6ba6b8d578b4fd2649129474e85ce416c787 /tools/h5repack/testh5repack_main.c | |
parent | 791e811bb531964e5a5d72c40b5ab8faa2649836 (diff) | |
download | hdf5-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.c | 61 |
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; |