diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-05-19 14:42:39 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2009-05-19 14:42:39 (GMT) |
commit | dcb4be8779e76187ffb21e55dd7be56f68dcf25f (patch) | |
tree | d7cb51e821ce8f17e1e9c7cb24c6b445fc2658b8 /hl/fortran/test/tstlite.f90 | |
parent | c18a27cb3f1a3481fef86ac1526e233f55528fad (diff) | |
download | hdf5-dcb4be8779e76187ffb21e55dd7be56f68dcf25f.zip hdf5-dcb4be8779e76187ffb21e55dd7be56f68dcf25f.tar.gz hdf5-dcb4be8779e76187ffb21e55dd7be56f68dcf25f.tar.bz2 |
[svn-r16959] Description:
Merged changes from the trunk into the branch.
svn merge -r16933:16958 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
Platforms tested: smirom (icc)
Diffstat (limited to 'hl/fortran/test/tstlite.f90')
-rw-r--r-- | hl/fortran/test/tstlite.f90 | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 9332c10..168bb99 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -717,6 +717,40 @@ end do call passed() + +!------------------------------------------------------------------------- +! string +!------------------------------------------------------------------------- + +call test_begin(' Make/Read datasets (string) ') + + +! +! write dataset. +! +call h5ltmake_dataset_string_f(file_id, dsetname5, buf1, errcode) + +! +! read dataset. +! +call h5ltread_dataset_string_f(file_id, dsetname5, buf1r, errcode) + +! +! compare read and write buffers. +! +if ( buf1 .ne. buf1r ) then + print *, 'read buffer differs from write buffer' + print *, buf1, ' and ', buf1r + stop +endif + +call passed() + + + + + + call test_begin(' Get dataset dimensions/info ') !------------------------------------------------------------------------- @@ -799,8 +833,8 @@ character(LEN=5), parameter :: attrname2 = "attr2" ! Attribute name character(LEN=5), parameter :: attrname3 = "attr3" ! Attribute name character(LEN=5), parameter :: attrname4 = "attr4" ! Attribute name character(LEN=5), parameter :: attrname5 = "attr5" ! Attribute name -character(LEN=9), parameter :: buf1 = "mystring" ! Data buffer -character(LEN=9) :: bufr1 ! Data buffer +character(LEN=8), parameter :: buf1 = "mystring" ! Data buffer +character(LEN=8) :: bufr1 ! Data buffer integer, dimension(DIM1) :: buf2 ! Data buffer integer, dimension(DIM1) :: bufr2 ! Data buffer real, dimension(DIM1) :: buf3 ! Data buffer @@ -936,6 +970,38 @@ end do call passed() + + +!------------------------------------------------------------------------- +! string +!------------------------------------------------------------------------- + +call test_begin(' Set/Get attributes string ') + + +! +! write attribute. +! +call h5ltset_attribute_string_f(file_id,dsetname1,attrname5,buf1,errcode) + +! +! read attribute. +! +call h5ltget_attribute_string_f(file_id,dsetname1,attrname5,bufr1,errcode) + +! +! compare read and write buffers. +! + +if ( buf1 .ne. bufr1 ) then + print *, 'read buffer differs from write buffer' + print *, buf1, ' and ', bufr1 + stop + endif + + +call passed() + !------------------------------------------------------------------------- ! get attribute rank !------------------------------------------------------------------------- |