summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-27 20:39:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-27 20:39:20 (GMT)
commit61a451f89ea2015eac08e361e6ad244bd4af5f25 (patch)
tree0f2dccdca39001329f6004a149e8384fa4e4433f /fortran/test
parent6042adf10b2c00796c52dec2a1f97a4989c42cfd (diff)
downloadhdf5-61a451f89ea2015eac08e361e6ad244bd4af5f25.zip
hdf5-61a451f89ea2015eac08e361e6ad244bd4af5f25.tar.gz
hdf5-61a451f89ea2015eac08e361e6ad244bd4af5f25.tar.bz2
[svn-r8117] Purpose:
Code cleanup Description: Add C++ and FORTRAN wrappers for new H5Pdelete_filter routine, along with documentation and a note in the release notes. Platforms tested: FreeBSD 4.9 (sleipnir) Linux 2.4 (verbena) w/ C++ and FORTRAN Too minor for full h5committest
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/tH5Z.f9054
1 files changed, 54 insertions, 0 deletions
diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.f90
index 7425f14..6d84139 100644
--- a/fortran/test/tH5Z.f90
+++ b/fortran/test/tH5Z.f90
@@ -23,6 +23,7 @@
INTEGER, INTENT(OUT) :: total_error
LOGICAL :: status, status1
INTEGER(HID_T) :: crtpr_id, xfer_id
+ INTEGER :: nfilters
INTEGER :: error
INTEGER(HSIZE_T) :: ch_dims(2)
INTEGER :: RANK = 2
@@ -92,6 +93,59 @@
endif
+!
+! Verify h5pdelete_filter_f
+!
+ CALL h5zfilter_avail_f(H5Z_FILTER_FLETCHER32_F, status, error)
+ CALL check("h5zfilter_avail_f", error, total_error)
+ if(status) then
+ CALL h5zfilter_avail_f(H5Z_FILTER_SHUFFLE_F, status, error)
+ CALL check("h5zfilter_avail_f", error, total_error)
+ if(status) then
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, crtpr_id, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_fletcher32_f(crtpr_id, error)
+ CALL check("h5pset_fletcher32_f", error, total_error)
+ CALL h5pset_shuffle_f(crtpr_id, error)
+ CALL check("h5pset_shuffle_f", error, total_error)
+ CALL h5pget_nfilters_f(crtpr_id, nfilters, error)
+ CALL check("h5pget_nfilters_f", error, total_error)
+
+ ! Verify the correct number of filters
+ if (nfilters .ne. 2) then
+ write(*,*) "number of filters is wrong"
+ total_error = total_error + 1
+ endif
+
+ ! Delete a single filter
+ CALL h5pdelete_filter_f(crtpr_id, H5Z_FILTER_SHUFFLE_F, error)
+ CALL check("h5pset_shuffle_f", error, total_error)
+
+ ! Verify the correct number of filters now
+ CALL h5pget_nfilters_f(crtpr_id, nfilters, error)
+ CALL check("h5pget_nfilters_f", error, total_error)
+ if (nfilters .ne. 1) then
+ write(*,*) "number of filters is wrong"
+ total_error = total_error + 1
+ endif
+
+ ! Delete all filters
+ CALL h5pdelete_filter_f(crtpr_id, H5Z_FILTER_NONE_F, error)
+ CALL check("h5pdelete_filter_f", error, total_error)
+
+ ! Verify the correct number of filters now
+ CALL h5pget_nfilters_f(crtpr_id, nfilters, error)
+ CALL check("h5pget_nfilters_f", error, total_error)
+ if (nfilters .ne. 0) then
+ write(*,*) "number of filters is wrong"
+ total_error = total_error + 1
+ endif
+ CALL h5pclose_f(crtpr_id,error)
+ CALL check("h5pclose_f", error, total_error)
+ endif
+ endif
+
+
RETURN
END SUBROUTINE filters_test