summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/test/tH5D.f9013
1 files changed, 12 insertions, 1 deletions
diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.f90
index 682e242..9f7b50c 100644
--- a/fortran/test/tH5D.f90
+++ b/fortran/test/tH5D.f90
@@ -25,7 +25,7 @@
! NOTES
! Tests the H5D APIs functionalities of:
! h5dcreate_f, h5dopen_f, h5dclose_f, h5dget_space_f, h5dget_type_f,
-! h5dread_f, and h5dwrite_f
+! h5dread_f, and h5dwrite_f, h5dget_space_status_f
!
!
! CONTAINS SUBROUTINES
@@ -64,6 +64,7 @@
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
INTEGER(HSIZE_T), DIMENSION(1) :: null_data_dim
INTEGER :: null_dset_data = 1 ! null data
+ INTEGER :: flag ! Space allocation status
!
! Initialize the dset_data array.
@@ -163,6 +164,16 @@
CALL h5dopen_f(file_id, null_dsetname, null_dset, error)
CALL check("h5dopen_f", error, total_error)
+ ! Test whether space has been allocated for a dataset
+ CALL h5dget_space_status_f(dset_id, flag, error)
+ CALL check("h5dget_space_status_f",error, total_error)
+ CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_ALLOCATED_F, total_error)
+
+ CALL h5dget_space_status_f(null_dset, flag, error)
+ CALL check("h5dget_space_status_f",error, total_error)
+ CALL verify("h5dget_space_status_f", flag, H5D_SPACE_STS_NOT_ALLOCATED_F, total_error)
+
+
!
! Get the dataset type.
!