summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5Z.f90
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test/tH5Z.f90')
-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