From d66172b99f4c1546066e2e4776b9c13e30eb2f4b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 28 Nov 2011 23:21:56 -0500 Subject: [svn-r21778] Description: Added test for h5dget_space_status_f. Tested: jam (gnu, intel, pgi) --- fortran/test/tH5D.f90 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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. ! -- cgit v0.12