summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-11-29 04:21:56 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-11-29 04:21:56 (GMT)
commitd66172b99f4c1546066e2e4776b9c13e30eb2f4b (patch)
treee73a80abb49843e9a7cefb71a345fe8ed65cd233 /fortran
parentf210c86df3b887ef672a2f4f160fe60abec26eb0 (diff)
downloadhdf5-d66172b99f4c1546066e2e4776b9c13e30eb2f4b.zip
hdf5-d66172b99f4c1546066e2e4776b9c13e30eb2f4b.tar.gz
hdf5-d66172b99f4c1546066e2e4776b9c13e30eb2f4b.tar.bz2
[svn-r21778] Description:
Added test for h5dget_space_status_f. Tested: jam (gnu, intel, pgi)
Diffstat (limited to 'fortran')
-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.
!