summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-04-14 03:58:16 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-04-14 03:58:16 (GMT)
commitd7e1464058515d07b838741f65a77977224814de (patch)
treec25d0985895862053d6b9d1eb1fce4fa94d471e3 /fortran/test
parent4918d443bb2f8406c3be9882a7945853c84760f6 (diff)
downloadhdf5-d7e1464058515d07b838741f65a77977224814de.zip
hdf5-d7e1464058515d07b838741f65a77977224814de.tar.gz
hdf5-d7e1464058515d07b838741f65a77977224814de.tar.bz2
Add C++, Java, and FORTRAN wrappers and tests for H5Fget_fileno
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/tH5F.F9029
1 files changed, 29 insertions, 0 deletions
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index 2501996..b898c21 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -105,6 +105,10 @@ CONTAINS
INTEGER(SIZE_T) :: obj_count
INTEGER(HID_T) :: t1, t2, t3, t4
+ ! File numbers
+ INTEGER :: file_num1
+ INTEGER :: file_num2
+
!
!data buffers
!
@@ -287,6 +291,18 @@ CONTAINS
IF(obj_count.NE.2)THEN
total_error = total_error + 1
ENDIF
+
+ !
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file1_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(file2_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .EQ. file_num2) THEN
+ write(*,*) "file numbers aren't supposed to match"
+ END IF
+
!
!mount the second file under the first file's "/G" group.
!
@@ -431,6 +447,8 @@ CONTAINS
INTEGER, DIMENSION(4,6) :: dset_data, data_out
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
INTEGER(HSIZE_T) :: file_size
+ INTEGER :: file_num1
+ INTEGER :: file_num2
CHARACTER(LEN=80) :: file_name
INTEGER(SIZE_T) :: name_size
@@ -499,6 +517,17 @@ CONTAINS
CALL check("h5fget_filesize_f",error,total_error)
!
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(reopen_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .NE. file_num2) THEN
+ write(*,*) "file numbers don't match"
+ END IF
+
+ !
!Open the dataset based on the reopen_id.
!
CALL h5dopen_f(reopen_id, dsetname, dset_id, error)