summaryrefslogtreecommitdiffstats
path: root/hl/fortran/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-09-29 16:23:57 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-09-29 16:23:57 (GMT)
commit9140500b86f1143e9d0684db553d796271bffc14 (patch)
treeebfc0882283c40207f6683024dac3f477a428298 /hl/fortran/test
parent17893b24ea87ae013d88ab280e262cbde00e2815 (diff)
downloadhdf5-9140500b86f1143e9d0684db553d796271bffc14.zip
hdf5-9140500b86f1143e9d0684db553d796271bffc14.tar.gz
hdf5-9140500b86f1143e9d0684db553d796271bffc14.tar.bz2
[svn-r25631] Fix fo HDFFV-8912
Diffstat (limited to 'hl/fortran/test')
-rw-r--r--hl/fortran/test/tsttable.f9021
1 files changed, 18 insertions, 3 deletions
diff --git a/hl/fortran/test/tsttable.f90 b/hl/fortran/test/tsttable.f90
index 66ec5c6..bb88abf 100644
--- a/hl/fortran/test/tsttable.f90
+++ b/hl/fortran/test/tsttable.f90
@@ -175,13 +175,30 @@ SUBROUTINE test_table1()
CALL h5tbwrite_field_name_f(file_id,dsetname1,field_names(4),start,nrecords,type_sizer,&
bufr,errcode)
-
!-------------------------------------------------------------------------
! read field
!-------------------------------------------------------------------------
+ ! Read an invalid field, should fail
+ CALL h5tbread_field_name_f(file_id,dsetname1,'DoesNotExist',start,nrecords,type_sizec,&
+ bufsr,errcode)
+
+ IF(errcode.GE.0)THEN
+ PRINT *, 'error in h5tbread_field_name_f'
+ CALL h5fclose_f(file_id, errcode)
+ CALL h5close_f(errcode)
+ STOP
+ ENDIF
+
+ ! Read a valid field, should pass
CALL h5tbread_field_name_f(file_id,dsetname1,field_names(1),start,nrecords,type_sizec,&
bufsr,errcode)
+ IF(errcode.LT.0)THEN
+ PRINT *, 'error in h5tbread_field_name_f'
+ CALL h5fclose_f(file_id, errcode)
+ CALL h5close_f(errcode)
+ STOP
+ ENDIF
!
! compare read and write buffers.
@@ -329,8 +346,6 @@ SUBROUTINE test_table1()
! we insert a field callsed "field5" with the same type and buffer as field 4 (Real)
!-------------------------------------------------------------------------
-
-
CALL test_begin(' Insert field ')
CALL h5tbinsert_field_f(file_id,dsetname1,"field5",field_types(4),4,bufr,errcode)