summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-23 19:16:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-23 19:16:31 (GMT)
commit46d917001cc78bb7250167f755c12ae6dea6854c (patch)
tree8f03c918de43ece1026803f66115b457b3573bc6 /fortran/test
parenta051d43645edb74483fcc2757fa267d081f527df (diff)
downloadhdf5-46d917001cc78bb7250167f755c12ae6dea6854c.zip
hdf5-46d917001cc78bb7250167f755c12ae6dea6854c.tar.gz
hdf5-46d917001cc78bb7250167f755c12ae6dea6854c.tar.bz2
[svn-r15262] Description:
Merge revisions 15037:15130 from trunk into metadata journaling branch Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.2 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/Makefile.am1
-rw-r--r--fortran/test/fortranlib_test.f90404
-rw-r--r--fortran/test/fortranlib_test_1_8.f9082
-rw-r--r--fortran/test/tH5A_1_8.f90120
-rw-r--r--fortran/test/tH5G_1_8.f9081
-rw-r--r--fortran/test/tH5O.f908
-rw-r--r--fortran/test/tf.f9042
7 files changed, 377 insertions, 361 deletions
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 7d619d9..ca0a1b4 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -70,4 +70,5 @@ FORTRAN_API=yes
# fflush2 depends on files created by fflush1
fflush2.chkexe_: fflush1.chkexe_
+
include $(top_srcdir)/config/conclude.am
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index c3abf51..2bc2ab7 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -17,323 +17,209 @@
!
! Testing Fortran functionality.
!
- PROGRAM fortranlibtest
-
- USE HDF5
-
- IMPLICIT NONE
- INTEGER :: total_error = 0
- INTEGER :: error
- INTEGER :: mounting_total_error = 0
- INTEGER :: reopen_total_error = 0
- INTEGER :: fclose_total_error = 0
- INTEGER :: fspace_total_error = 0
- INTEGER :: dataset_total_error = 0
- INTEGER :: extend_dataset_total_error = 0
- INTEGER :: refobj_total_error = 0
- INTEGER :: refreg_total_error = 0
- INTEGER :: dataspace_total_error = 0
- INTEGER :: hyperslab_total_error = 0
- INTEGER :: element_total_error = 0
- INTEGER :: basic_select_total_error = 0
- INTEGER :: total_error_compoundtest = 0
- INTEGER :: basic_datatype_total_error = 0
- INTEGER :: enum_total_error = 0
- INTEGER :: external_total_error = 0
- INTEGER :: multi_file_total_error = 0
- INTEGER :: attribute_total_error = 0
- INTEGER :: identifier_total_error = 0
- INTEGER :: group_total_error = 0
- INTEGER :: error_total_error = 0
- INTEGER :: vl_total_error = 0
- INTEGER :: z_total_error = 0
- INTEGER :: sz_total_error = 0
- INTEGER :: majnum, minnum, relnum
- CHARACTER(LEN=8) error_string
- CHARACTER(LEN=8) :: success = ' PASSED '
- CHARACTER(LEN=8) :: failure = '*FAILED*'
- CHARACTER(LEN=8) :: skip = '--SKIP--'
- CHARACTER(LEN=4) :: e_format ='(8a)'
- LOGICAL :: cleanup = .TRUE.
-! LOGICAL :: cleanup = .FALSE.
- LOGICAL :: szip_flag
-
- CALL h5open_f(error)
- write(*,*) ' ========================== '
- write(*,*) ' FORTRAN tests '
- write(*,*) ' ========================== '
- CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
- if(total_error .eq. 0) then
-
- write(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
- write(*, '(I1)', advance="NO") majnum
- write(*, '(".")', advance="NO")
- write(*, '(I1)', advance="NO") minnum
- write(*, '(" release ")', advance="NO")
- write(*, '(I3)') relnum
- else
- total_error = total_error + 1
- endif
- write(*,*)
+PROGRAM fortranlibtest
+
+ USE HDF5
+
+ IMPLICIT NONE
+ INTEGER :: total_error = 0
+ INTEGER :: error
+ INTEGER :: majnum, minnum, relnum
+ LOGICAL :: cleanup = .TRUE.
+! LOGICAL :: cleanup = .FALSE.
+ LOGICAL :: szip_flag
+ INTEGER :: ret_total_error
+
+ CALL h5open_f(error)
+ WRITE(*,*) ' ========================== '
+ WRITE(*,*) ' FORTRAN tests '
+ WRITE(*,*) ' ========================== '
+ CALL h5get_libversion_f(majnum, minnum, relnum, total_error)
+ IF(total_error .EQ. 0) THEN
+
+ WRITE(*, '(" FORTRANLIB_TEST is linked with HDF5 Library version ")', advance="NO")
+ WRITE(*, '(I1)', advance="NO") majnum
+ WRITE(*, '(".")', advance="NO")
+ WRITE(*, '(I1)', advance="NO") minnum
+ WRITE(*, '(" release ")', advance="NO")
+ WRITE(*, '(I3)') relnum
+ ELSE
+ total_error = total_error + 1
+ ENDIF
+ WRITE(*,*)
! CALL h5check_version_f(1,4,4,total_error)
! write(*,*) '========================================='
! write(*,*) 'Testing FILE Interface '
! write(*,*) '========================================='
- error_string = failure
- CALL mountingtest(cleanup, mounting_total_error)
- IF (mounting_total_error == 0) error_string = success
- write(*, fmt = '(14a)', advance = 'no') ' Mounting test'
- write(*, fmt = '(56x,a)', advance = 'no') ' '
-
- write(*, fmt = e_format) error_string
- total_error = total_error + mounting_total_error
- error_string = failure
- CALL reopentest(cleanup, reopen_total_error)
- IF (reopen_total_error == 0) error_string = success
- write(*, fmt = '(12a)', advance = 'no') ' Reopen test'
- write(*, fmt = '(58x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + reopen_total_error
+
+
+ ret_total_error = 0
+ CALL mountingtest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Mounting test', total_error)
+
+ ret_total_error = 0
+ CALL reopentest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Reopen test', total_error)
!DEC$ if defined(H5_VMS)
- goto 100
+ GOTO 8
!DEC$ else
- error_string = failure
- CALL file_close(cleanup, fclose_total_error)
- IF (fclose_total_error == 0) error_string = success
- write(*, fmt = '(21a)', advance = 'no') ' File open/close test'
- write(*, fmt = '(49x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + fclose_total_error
+ ret_total_error = 0
+ CALL file_close(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' File open/close test', total_error)
!DEC$ endif
-100 continue
- error_string = failure
- CALL file_space(cleanup, fspace_total_error)
- IF (fspace_total_error == 0) error_string = success
- write(*, fmt = '(21a)', advance = 'no') ' File free space test'
- write(*, fmt = '(49x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + fspace_total_error
+8 CONTINUE
+
+ ret_total_error = 0
+ CALL file_space(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' File free space test', total_error)
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATASET Interface '
! write(*,*) '========================================='
- error_string = failure
- CALL datasettest(cleanup, dataset_total_error)
- IF (dataset_total_error == 0) error_string = success
- write(*, fmt = '(13a)', advance = 'no') ' Dataset test'
- write(*, fmt = '(57x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + dataset_total_error
- error_string = failure
- CALL extenddsettest(cleanup, extend_dataset_total_error)
- IF (extend_dataset_total_error == 0) error_string = success
- write(*, fmt = '(24a)', advance = 'no') ' Extendible dataset test'
- write(*, fmt = '(46x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + extend_dataset_total_error
+ ret_total_error = 0
+ CALL datasettest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Dataset test', total_error)
+
+ ret_total_error = 0
+ CALL extenddsettest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Extendible dataset test', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATASPACE Interface '
! write(*,*) '========================================='
- error_string = failure
- CALL dataspace_basic_test(cleanup, dataspace_total_error)
- IF (dataspace_total_error == 0) error_string = success
- write(*, fmt = '(21a)', advance = 'no') ' Basic dataspace test'
- write(*, fmt = '(49x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + dataspace_total_error
-
+ ret_total_error = 0
+ CALL dataspace_basic_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Basic dataspace test', total_error)
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing REFERENCE Interface '
! write(*,*) '========================================='
- error_string = failure
- CALL refobjtest(cleanup, refobj_total_error)
- IF (refobj_total_error == 0) error_string = success
- write(*, fmt = '(25a)', advance = 'no') ' Reference to object test'
- write(*, fmt = '(45x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + refobj_total_error
-
- error_string = failure
- CALL refregtest(cleanup, refreg_total_error)
- IF (refreg_total_error == 0) error_string = success
- write(*, fmt = '(33a)', advance = 'no') ' Reference to dataset region test'
- write(*, fmt = '(37x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + refreg_total_error
+ ret_total_error = 0
+ CALL refobjtest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Reference to object test', total_error)
+
+ ret_total_error = 0
+ CALL refregtest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Reference to dataset region test', total_error)
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing selection functionalities '
! write(*,*) '========================================='
- error_string = failure
- CALL test_basic_select(cleanup, basic_select_total_error)
- IF (basic_select_total_error == 0) error_string = success
- write(*, fmt = '(21a)', advance = 'no') ' Basic selection test'
- write(*, fmt = '(49x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + basic_select_total_error
-
- error_string = failure
- CALL test_select_hyperslab( cleanup, hyperslab_total_error)
- IF ( hyperslab_total_error == 0) error_string = success
- write(*, fmt = '(25a)', advance = 'no') ' Hyperslab selection test'
- write(*, fmt = '(45x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + hyperslab_total_error
-
- error_string = failure
- CALL test_select_element(cleanup, element_total_error)
- IF (element_total_error == 0) error_string = success
- write(*, fmt = '(23a)', advance = 'no') ' Element selection test'
- write(*, fmt = '(47x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + element_total_error
+ ret_total_error = 0
+ CALL test_basic_select(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Basic selection test', total_error)
+ ret_total_error = 0
+ CALL test_select_hyperslab( cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Hyperslab selection test', total_error)
+
+ ret_total_error = 0
+ CALL test_select_element(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Element selection test', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing DATATYPE interface '
! write(*,*) '========================================='
- error_string = failure
- CALL basic_data_type_test(cleanup, basic_datatype_total_error)
- IF (basic_datatype_total_error == 0) error_string = success
- write(*, fmt = '(20a)', advance = 'no') ' Basic datatype test'
- write(*, fmt = '(50x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + basic_datatype_total_error
-
- error_string = failure
- CALL compoundtest(cleanup, total_error_compoundtest)
- IF (total_error_compoundtest == 0) error_string = success
- write(*, fmt = '(23a)', advance = 'no') ' Compound datatype test'
- write(*, fmt = '(47x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + total_error_compoundtest
- error_string = failure
- CALL enumtest(cleanup, enum_total_error)
- IF (enum_total_error == 0) error_string = success
- write(*, fmt = '(19a)', advance = 'no') ' Enum datatype test'
- write(*, fmt = '(51x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + enum_total_error
+ ret_total_error = 0
+ CALL basic_data_type_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Basic datatype test', total_error)
+
+ ret_total_error = 0
+ CALL compoundtest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Compound datatype test', total_error)
+
+ ret_total_error = 0
+ CALL enumtest(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Enum datatype test', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing PROPERTY interface '
! write(*,*) '========================================='
- error_string = failure
- CALL external_test(cleanup, external_total_error)
- IF (external_total_error == 0) error_string = success
- write(*, fmt = '(22a)', advance = 'no') ' External dataset test'
- write(*, fmt = '(48x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + external_total_error
-
- error_string = failure
-! error_string = skip
- cleanup = .FALSE.
- CALL multi_file_test(cleanup, multi_file_total_error)
- IF (multi_file_total_error == 0) error_string = success
- write(*, fmt = '(23a)', advance = 'no') ' Multi file driver test'
- write(*, fmt = '(47x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + multi_file_total_error
+ ret_total_error = 0
+ CALL external_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' External dataset test', total_error)
+
+ ret_total_error = 0
+ cleanup = .FALSE.
+ CALL multi_file_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Multi file driver test', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing ATTRIBUTE interface '
! write(*,*) '========================================='
- error_string = failure
- CALL attribute_test(cleanup, attribute_total_error)
- write(*, fmt = '(15a)', advance = 'no') ' Attribute test'
- write(*, fmt = '(55x,a)', advance = 'no') ' '
- IF (attribute_total_error == 0) error_string = success
- write(*, fmt = e_format) error_string
- total_error = total_error + attribute_total_error
+ ret_total_error = 0
+ CALL attribute_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Attribute test', total_error)
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing IDENTIFIER interface '
! write(*,*) '========================================='
- error_string = failure
- CALL identifier_test(cleanup, identifier_total_error)
- IF (identifier_total_error == 0) error_string = success
- write(*, fmt = '(16a)', advance = 'no') ' Identifier test'
- write(*, fmt = '(54x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + identifier_total_error
- error_string = failure
- CALL filters_test(cleanup, z_total_error)
- IF (z_total_error == 0) error_string = success
- write(*, fmt = '(13a)', advance = 'no') ' Filters test'
- write(*, fmt = '(57x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + z_total_error
-
- CALL szip_test(szip_flag, cleanup, sz_total_error)
- IF (sz_total_error == 0) error_string = success
- ! Reset the flag is compression was not available
- IF (.NOT. szip_flag) error_string = skip
- IF (sz_total_error .gt. 0) error_string = failure
- write(*, fmt = '(18a)', advance = 'no') ' SZIP filter test'
- write(*, fmt = '(53x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- if(sz_total_error .gt. 0) total_error = total_error + sz_total_error
+ ret_total_error = 0
+ CALL identifier_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Identifier test', total_error)
+
+ ret_total_error = 0
+ CALL filters_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Filters test', total_error)
+
+ ret_total_error = 0
+ CALL szip_test(szip_flag, cleanup, ret_total_error)
+
+ IF (.NOT. szip_flag) THEN ! test not available
+ CALL write_test_status(-1, ' SZIP filter test', total_error)
+ ELSE
+ CALL write_test_status(ret_total_error, ' SZIP filter test', total_error)
+ ENDIF
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing GROUP interface '
! write(*,*) '========================================='
- error_string = failure
- CALL group_test(cleanup, group_total_error)
- IF (group_total_error == 0) error_string = success
- write(*, fmt = '(11a)', advance = 'no') ' Group test'
- write(*, fmt = '(59x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + group_total_error
-
- error_string = failure
- CALL error_report_test(cleanup, error_total_error)
- IF (error_total_error == 0) error_string = success
- write(*, fmt = '(11a)', advance = 'no') ' Error test'
- write(*, fmt = '(59x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + error_total_error
-
- error_string = failure
- CALL vl_test_integer(cleanup, vl_total_error)
- CALL vl_test_real(cleanup, vl_total_error)
- CALL vl_test_string(cleanup, vl_total_error)
- IF (vl_total_error == 0) error_string = success
- write(*, fmt = '(11a)', advance = 'no') ' VL test'
- write(*, fmt = '(62x,a)', advance = 'no') ' '
- write(*, fmt = e_format) error_string
- total_error = total_error + vl_total_error
-
- write(*,*)
-
- write(*,*) ' ============================================ '
- write(*, fmt = '(19x, 27a)', advance='NO') ' FORTRAN tests completed with '
- write(*, fmt = '(i4)', advance='NO') total_error
- write(*, fmt = '(12a)' ) ' error(s) ! '
- write(*,*) ' ============================================ '
-
- CALL h5close_f(error)
-
- ! if errors detected, exit with non-zero code.
- IF (total_error .ne. 0) CALL h5_exit_f (1)
-
- END PROGRAM fortranlibtest
+ ret_total_error = 0
+ CALL group_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Group test', total_error)
+
+ ret_total_error = 0
+ CALL error_report_test(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Error test', total_error)
+
+ ret_total_error = 0
+ CALL vl_test_integer(cleanup, ret_total_error)
+ CALL vl_test_real(cleanup, ret_total_error)
+ CALL vl_test_string(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' VL test', total_error)
+
+ WRITE(*,*)
+
+ WRITE(*,*) ' ============================================ '
+ WRITE(*, fmt = '(19x, 27a)', advance='NO') ' FORTRAN tests completed with '
+ WRITE(*, fmt = '(i4)', advance='NO') total_error
+ WRITE(*, fmt = '(12a)' ) ' error(s) ! '
+ WRITE(*,*) ' ============================================ '
+
+ CALL h5close_f(error)
+
+ ! if errors detected, exit with non-zero code.
+ IF (total_error .NE. 0) CALL h5_exit_f (1)
+
+END PROGRAM fortranlibtest
diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.f90
index ac87272..4ff3e0f 100644
--- a/fortran/test/fortranlib_test_1_8.f90
+++ b/fortran/test/fortranlib_test_1_8.f90
@@ -26,10 +26,6 @@ PROGRAM fortranlibtest
INTEGER :: error
INTEGER :: ret_total_error
INTEGER :: majnum, minnum, relnum
- CHARACTER(LEN=8) error_string
- CHARACTER(LEN=8) :: success = ' PASSED '
- CHARACTER(LEN=8) :: failure = '*FAILED*'
- CHARACTER(LEN=4) :: e_format ='(8a)'
LOGICAL :: cleanup = .TRUE.
! LOGICAL :: cleanup = .FALSE.
@@ -51,69 +47,46 @@ PROGRAM fortranlibtest
WRITE(*,*)
ret_total_error = 0
- error_string = failure
CALL file_space(cleanup, ret_total_error)
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = '(21a)', advance = 'no') ' Testing file free space'
- WRITE(*, fmt = '(52x,a)', advance = 'no') ' '
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
- ! write(*,*)
- ! write(*,*) '========================================='
- ! write(*,*) 'Testing ATTRIBUTE interface '
- ! write(*,*) '========================================='
+ CALL write_test_status(ret_total_error, &
+ ' Testing file free space', &
+ total_error)
ret_total_error = 0
- error_string = failure
CALL attribute_test_1_8(cleanup, ret_total_error)
- WRITE(*, fmt = '(15a)', advance = 'no') ' Testing attributes'
- WRITE(*, fmt = '(57x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing attributes', &
+ total_error)
ret_total_error = 0
- error_string = failure
CALL group_test(cleanup, ret_total_error)
- WRITE(*, fmt = '(15a)', advance = 'no') ' Testing groups'
- WRITE(*, fmt = '(61x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing groups', &
+ total_error)
ret_total_error = 0
- error_string = failure
CALL test_h5o(cleanup, ret_total_error)
- WRITE(*, fmt = '(15a)', advance = 'no') ' Testing object interface'
- WRITE(*, fmt = '(51x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing object interface', &
+ total_error)
ret_total_error = 0
- error_string = failure
CALL dtransform(cleanup, ret_total_error)
- WRITE(*, fmt = '(15a)', advance = 'no') ' Testing data transform'
- WRITE(*, fmt = '(53x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing data transform', &
+ total_error)
ret_total_error = 0
- error_string = failure
CALL test_genprop_basic_class(cleanup, ret_total_error)
- WRITE(*, fmt = '(30a)', advance = 'no') ' Testing basic generic properties'
- WRITE(*, fmt = '(43x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing basic generic properties', &
+ total_error)
+ ret_total_error = 0
CALL test_h5s_encode(cleanup, ret_total_error)
- WRITE(*, fmt = '(15a)', advance = 'no') ' Testing dataspace encoding and decoding'
- WRITE(*, fmt = '(36x,a)', advance = 'no') ' '
- IF (ret_total_error == 0) error_string = success
- WRITE(*, fmt = e_format) error_string
- total_error = total_error + ret_total_error
+ CALL write_test_status(ret_total_error, &
+ ' Testing dataspace encoding and decoding', &
+ total_error)
! CALL test_hard_query(group_total_error)
@@ -139,8 +112,8 @@ SUBROUTINE dtransform(cleanup, total_error)
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(INOUT) :: total_error
- INTEGER(HID_T) :: dxpl_id_c_to_f, dxpl_id_c_to_f_copy
- INTEGER(HID_T) :: dxpl_id_simple, dxpl_id_polynomial, dxpl_id_polynomial_copy, dxpl_id_utrans_inv, file_id
+ INTEGER(HID_T) :: dxpl_id_c_to_f
+ INTEGER(HID_T) :: file_id
CHARACTER(LEN=15), PARAMETER :: c_to_f = "(9/5.0)*x + 123"
INTEGER :: error
@@ -206,7 +179,6 @@ SUBROUTINE test_genprop_basic_class(cleanup, total_error)
INTEGER(HID_T) :: cid1 !/* Generic Property class ID */
INTEGER(HID_T) :: cid2 !/* Generic Property class ID */
- INTEGER(HID_T) :: cid3 !/* Generic Property class ID */
CHARACTER(LEN=7) :: CLASS1_NAME = "Class 1"
CHARACTER(LEN=7) :: name ! /* Name of class */
@@ -294,10 +266,10 @@ SUBROUTINE test_h5s_encode(cleanup, total_error)
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(INOUT) :: total_error
- INTEGER(hid_t) :: sid1, sid2, sid3! /* Dataspace ID */
- INTEGER(hid_t) :: decoded_sid1, decoded_sid2, decoded_sid3
+ INTEGER(hid_t) :: sid1, sid3! /* Dataspace ID */
+ INTEGER(hid_t) :: decoded_sid1, decoded_sid3
INTEGER :: rank !/* LOGICAL rank of dataspace */
- INTEGER(size_t) :: sbuf_size=0, null_size=0, scalar_size=0
+ INTEGER(size_t) :: sbuf_size=0, scalar_size=0
! Make sure the size is large, need variable length in fortran 2003
CHARACTER(LEN=288) :: sbuf
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index cbd1840..a74b63f 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -22,7 +22,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
!
USE HDF5 ! This module contains all necessary modules
-
+
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
@@ -56,6 +56,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
LOGICAL, DIMENSION(1:2) :: new_format = (/.TRUE.,.FALSE./)
LOGICAL, DIMENSION(1:2) :: use_shared = (/.TRUE.,.FALSE./)
+ INTEGER :: ret_total_error
! ********************
! test_attr equivelent
@@ -81,14 +82,20 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
CALL check(" H5Pset_shared_mesg_index_f",error, total_error)
DO i = 1, 2
+
IF (new_format(i)) THEN
-! WRITE(*,*) " - Testing with new file format"
+ WRITE(*,'(1X,A)') "Testing with new file format:"
my_fapl = fapl2
ELSE
-! WRITE(*,*) " - Testing with old file format"
+ WRITE(*,'(1X,A)') "Testing with old file format:"
my_fapl = fapl
END IF
- CALL test_attr_basic_write(my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_basic_write(my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Tests INT attributes on both datasets and groups', &
+ total_error)
+
!!$ CALL test_attr_basic_read(my_fapl)
!!$ CALL test_attr_flush(my_fapl)
!!$ CALL test_attr_plist(my_fapl) ! this is next
@@ -104,39 +111,89 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
IF(new_format(i)) THEN
DO j = 1, 2
IF (use_shared(j)) THEN
-! WRITE(*,*) " - Testing with shared attributes"
+ WRITE(*,*) " - Testing with shared attributes:"
my_fcpl = fcpl2
ELSE
-! WRITE(*,*) " - Testing without shared attributes"
+ WRITE(*,*) " - Testing without shared attributes:"
my_fcpl = fcpl
END IF
!!$ CALL test_attr_dense_create(my_fcpl, my_fapl)
- CALL test_attr_dense_open(my_fcpl, my_fapl, total_error)
+
+ ret_total_error = 0
+ CALL test_attr_dense_open(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing INT attributes on both datasets and groups', &
+ total_error)
+
!!$ CALL test_attr_dense_delete(my_fcpl, my_fapl)
!!$ CALL test_attr_dense_rename(my_fcpl, my_fapl)
!!$ CALL test_attr_dense_unlink(my_fcpl, my_fapl)
!!$ CALL test_attr_dense_limits(my_fcpl, my_fapl)
!!$ CALL test_attr_big(my_fcpl, my_fapl)
- CALL test_attr_null_space(my_fcpl, my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_null_space(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing storing attribute with "null" dataspace', &
+ total_error)
!!$ CALL test_attr_deprec(fcpl, my_fapl)
- CALL test_attr_many(new_format(i), my_fcpl, my_fapl, total_error)
- CALL test_attr_corder_create_basic(my_fcpl, my_fapl, total_error)
- CALL test_attr_corder_create_compact(my_fcpl, my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_many(new_format(i), my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing storing lots of attributes', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_attr_corder_create_basic(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing creating objects with attribute creation order', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_attr_corder_create_compact(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing compact storage on objects with attribute creation order', &
+ total_error)
!!$ CALL test_attr_corder_create_dense(my_fcpl, my_fapl)
!!$ CALL test_attr_corder_create_reopen(my_fcpl, my_fapl)
!!$ CALL test_attr_corder_transition(my_fcpl, my_fapl)
!!$ CALL test_attr_corder_delete(my_fcpl, my_fapl)
- CALL test_attr_info_by_idx(new_format, my_fcpl, my_fapl, total_error)
- CALL test_attr_delete_by_idx(new_format, my_fcpl, my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_info_by_idx(new_format, my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing querying attribute info by index', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_attr_delete_by_idx(new_format, my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing deleting attribute by index', &
+ total_error)
+
!!$ CALL test_attr_iterate2(new_format, my_fcpl, my_fapl)
!!$ CALL test_attr_open_by_idx(new_format, my_fcpl, my_fapl)
!!$ CALL test_attr_open_by_name(new_format, my_fcpl, my_fapl)
- CALL test_attr_create_by_name(new_format(i), my_fcpl, my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_create_by_name(new_format(i), my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' - Testing creating attributes by name', &
+ total_error)
+
! /* More complex tests with both "new format" and "shared" attributes */
IF( use_shared(j) ) THEN
!!$ CALL test_attr_shared_write(my_fcpl, my_fapl)
- CALL test_attr_shared_rename(my_fcpl, my_fapl, total_error)
- CALL test_attr_shared_delete(my_fcpl, my_fapl, total_error)
+ ret_total_error = 0
+ CALL test_attr_shared_rename(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error,&
+ ' - Testing renaming shared attributes in "compact" & "dense" storage', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_attr_shared_delete(my_fcpl, my_fapl, ret_total_error)
+ CALL write_test_status(ret_total_error,&
+ ' - Testing deleting shared attributes in "compact" & "dense" storage', &
+ total_error)
+
+
!!$ CALL test_attr_shared_unlink(my_fcpl, my_fapl)
END IF
!!$ CALL test_attr_bug1(my_fcpl, my_fapl)
@@ -155,7 +212,7 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
!!$ CALL test_attr_bug1(fcpl, my_fapl)
END IF
- END DO
+ ENDDO
CALL H5Pclose_f(fcpl, error)
CALL CHECK("H5Pclose", error,total_error)
@@ -171,6 +228,13 @@ END SUBROUTINE attribute_test_1_8
SUBROUTINE test_attr_corder_create_compact(fcpl,fapl, total_error)
+!/****************************************************************
+!**
+!** test_attr_corder_create_compact(): Test basic H5A (attribute) code.
+!** Tests compact attribute storage on objects with attribute creation order info
+!**
+!****************************************************************/
+
! Needed for get_info_by_name
USE HDF5 ! This module contains all necessary modules
@@ -510,6 +574,13 @@ END SUBROUTINE test_attr_null_space
SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error)
+!/****************************************************************
+!**
+!** test_attr_create_by_name(): Test basic H5A (attribute) code.
+!** Tests creating attributes by name
+!**
+!****************************************************************/
+
USE HDF5
IMPLICIT NONE
@@ -762,6 +833,13 @@ END SUBROUTINE test_attr_create_by_name
SUBROUTINE test_attr_info_by_idx(new_format, fcpl, fapl, total_error)
+!/****************************************************************
+!**
+!** test_attr_info_by_idx(): Test basic H5A (attribute) code.
+!** Tests querying attribute info by index
+!**
+!****************************************************************/
+
USE HDF5
IMPLICIT NONE
@@ -1610,6 +1688,13 @@ END SUBROUTINE test_attr_shared_rename
SUBROUTINE test_attr_delete_by_idx(new_format, fcpl, fapl, total_error)
+!/****************************************************************
+!**
+!** test_attr_delete_by_idx(): Test basic H5A (attribute) code.
+!** Tests deleting attribute by index
+!**
+!****************************************************************/
+
USE HDF5
IMPLICIT NONE
@@ -2873,7 +2958,6 @@ SUBROUTINE test_attr_basic_write(fapl, total_error)
INTEGER(HID_T) :: attr,attr2 !String Attribute identifier
INTEGER(HID_T) :: group
- INTEGER(HSIZE_T), DIMENSION(7) :: data_dims
CHARACTER(LEN=25) :: check_name
CHARACTER(LEN=18) :: chr_exact_size
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index 4639731..aea5248 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -22,7 +22,7 @@ SUBROUTINE group_test(cleanup, total_error)
INTEGER(HID_T) :: fapl, fapl2, my_fapl ! /* File access property lists */
- INTEGER :: error
+ INTEGER :: error, ret_total_error
! WRITE(*,*) "TESTING GROUPS"
CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
@@ -40,19 +40,60 @@ SUBROUTINE group_test(cleanup, total_error)
my_fapl = fapl2
- CALL mklinks(fapl2, total_error)
- CALL cklinks(fapl2, total_error)
+ ret_total_error = 0
+ CALL mklinks(fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing building a file with assorted links', &
+ total_error)
+
+ ret_total_error = 0
+ CALL cklinks(fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing links are correct and building assorted links', &
+ total_error)
+
+ ret_total_error = 0
+ CALL group_info(cleanup, fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing create group with creation order indices, test querying group info', &
+ total_error)
- CALL group_info(cleanup, fapl2,total_error)
! CALL ud_hard_links(fapl2,total_error)
- CALL timestamps(cleanup, fapl2, total_error)
- CALL test_move_preserves(fapl2, total_error)
- CALL delete_by_idx(cleanup,fapl2, total_error)
- CALL test_lcpl(cleanup, fapl, total_error)
-
- CALL objcopy(fapl, total_error)
-
- CALL lifecycle(cleanup, fapl2, total_error)
+ ret_total_error = 0
+ CALL timestamps(cleanup, fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing disabling tracking timestamps for an object', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_move_preserves(fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing moving and renaming links preserves their properties', &
+ total_error)
+
+ ret_total_error = 0
+ CALL delete_by_idx(cleanup,fapl2,ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing deleting links by index', &
+ total_error)
+
+ ret_total_error = 0
+ CALL test_lcpl(cleanup, fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing link creation property lists', &
+ total_error)
+
+ ret_total_error = 0
+ CALL objcopy(fapl, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing object copy', &
+ total_error)
+
+ ret_total_error = 0
+ CALL lifecycle(cleanup, fapl2, ret_total_error)
+ CALL write_test_status(ret_total_error, &
+ ' Testing adding links to a group follow proper "lifecycle"', &
+ total_error)
IF(cleanup) CALL h5_cleanup_f("TestLinks", H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
@@ -668,7 +709,6 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER(HID_T):: group_id
INTEGER(HID_T):: fcpl_id ! /* Group creation property list ID */
INTEGER(HID_T):: lcpl_id
- INTEGER(HID_T):: lcpl2_id
!H5O_info_t oinfo;
!H5L_info_t linfo;
INTEGER :: old_cset
@@ -877,18 +917,13 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error)
INTEGER(HID_T) :: fid !/* File ID */
INTEGER(HID_T) :: gid !/* Group ID */
- INTEGER(HID_T) :: gid2 !/* Datatype ID */
INTEGER(HID_T) :: gcpl !/* Group creation property list ID */
INTEGER(size_t) :: lheap_size_hint !/* Local heap size hint */
INTEGER :: max_compact !/* Maximum # of links to store in group compactly */
INTEGER :: min_dense !/* Minimum # of links to store in group "densely" */
INTEGER :: est_num_entries !/* Estimated # of entries in group */
INTEGER :: est_name_len !/* Estimated length of entry name */
- INTEGER :: nmsgs !/* Number of messages in group's header */
- CHARACTER(LEN=NAME_BUF_SIZE) :: objname ! /* Object name */
CHARACTER(LEN=NAME_BUF_SIZE) :: filename = 'fixx.h5'
- INTEGER :: empty_size ! /* Size of an empty file */
- INTEGER :: u ! /* Local index variable */
INTEGER(SIZE_T) :: LIFECYCLE_LOCAL_HEAP_SIZE_HINT = 256
INTEGER :: LIFECYCLE_MAX_COMPACT = 4
INTEGER :: LIFECYCLE_MIN_DENSE = 3
@@ -1030,7 +1065,6 @@ SUBROUTINE lifecycle(cleanup, fapl2, total_error)
! H5L_info_t linfo2;
CHARACTER(LEN=12), PARAMETER :: filename ='TestLinks.h5'
- CHARACTER(LEN=12) :: linkval
! TYPE(C_PTR) :: linkval
@@ -1106,7 +1140,6 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
CHARACTER(LEN=7) :: objname ! /* Object name */
CHARACTER(LEN=8) :: filename = 'file0.h5' ! /* File name */
- CHARACTER(LEN=7) :: tmpname ! /* Temporary link name */
CHARACTER(LEN=12), PARAMETER :: CORDER_GROUP_NAME = "corder_group"
LOGICAL :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
@@ -1124,11 +1157,8 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
!
!
!
- CHARACTER(LEN=6) :: filename1
- CHARACTER(LEN=6) :: filename2
CHARACTER(LEN=80) :: fix_filename1
CHARACTER(LEN=80) :: fix_filename2
- INTEGER(SIZE_T) :: size_tmp
INTEGER(HSIZE_T) :: htmp
LOGICAL :: cleanup
@@ -1332,7 +1362,6 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
CHARACTER(LEN=10) :: tmpname_big !/* to big temporary link name */
CHARACTER(LEN=7) :: valname !/* Link value name */
- CHARACTER(LEN=7) :: tmpval !/* Temporary link value */
CHARACTER(LEN=2) :: chr2
INTEGER(SIZE_T) :: size_tmp
INTEGER :: error
@@ -1439,7 +1468,6 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
! H5L_LINK_ERROR _F - Error
INTEGER :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(HSIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
- INTEGER(HSIZE_T) :: data_size ! Indicates the size, in the number of characters, of the attribute
CHARACTER(LEN=1024) :: filename = 'tempfile.h5'
INTEGER, PARAMETER :: TEST6_DIM1 = 8, TEST6_DIM2 = 7
@@ -1795,14 +1823,13 @@ SUBROUTINE lapl_nlinks( fapl, total_error)
INTEGER(HID_T) :: fid = (-1) !/* File ID */
INTEGER(HID_T) :: gid = (-1), gid2 = (-1) !/* Group IDs */
INTEGER(HID_T) :: plist = (-1) ! /* lapl ID */
- INTEGER(HID_T) :: tid = (-1), sid = (-1), did = (-1) ! /* Other IDs */
+ INTEGER(HID_T) :: tid = (-1) ! /* Other IDs */
INTEGER(HID_T) :: gapl = (-1), dapl = (-1), tapl = (-1) ! /* Other property lists */
CHARACTER(LEN=7) :: objname ! /* Object name */
INTEGER(size_t) :: name_len ! /* Length of object name */
CHARACTER(LEN=12) :: filename = 'TestLinks.h5'
INTEGER(size_t) :: nlinks ! /* nlinks for H5Pset_nlinks */
- INTEGER(hsize_t), DIMENSION(2) :: dims
INTEGER(size_t) :: buf_size = 7
! WRITE(*,*) "adjusting nlinks with LAPL (w/new group format)"
diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.f90
index 7e73104..0aa4abd 100644
--- a/fortran/test/tH5O.f90
+++ b/fortran/test/tH5O.f90
@@ -19,6 +19,7 @@ SUBROUTINE test_h5o(cleanup, total_error)
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
+ INTEGER :: error
! /* Output message about test being performed */
! WRITE(*,*) "Testing Objects"
@@ -30,6 +31,11 @@ SUBROUTINE test_h5o(cleanup, total_error)
CALL test_h5o_plist(total_error) ! /* Test object creation properties */
CALL test_h5o_link(total_error) ! /* Test object link routine */
+ IF(cleanup) CALL h5_cleanup_f("TestFile", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f("test", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
END SUBROUTINE test_h5o
!/****************************************************************
@@ -53,7 +59,7 @@ SUBROUTINE test_h5o_link(total_error)
INTEGER(HID_T) :: fapl_id
INTEGER(HID_T) :: lcpl_id
INTEGER(HID_T) :: mem_space_id, file_space_id, xfer_prp
- CHARACTER(LEN=8), PARAMETER :: TEST_FILENAME = 'TestFile'
+ CHARACTER(LEN=11), PARAMETER :: TEST_FILENAME = 'TestFile.h5'
INTEGER, PARAMETER :: TEST6_DIM1 = 2, TEST6_DIM2 = 5
!EP INTEGER(HSIZE_T), DIMENSION(1:2), PARAMETER :: dims = (/TEST6_DIM1,TEST6_DIM2/)
INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/TEST6_DIM1,TEST6_DIM2/)
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 1cbac24..d48ede1 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -18,11 +18,51 @@
! This file contains subroutines which are used in
! all the hdf5 fortran tests
!
+
+
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_DLL)
-!DEC$attributes dllexport :: check
+!DEC$attributes dllexport :: write_test_status
!DEC$endif
+ SUBROUTINE write_test_status( test_result, test_title, total_error)
+
+! Writes the results of the tests
+
+ IMPLICIT NONE
+
+ INTEGER, INTENT(IN) :: test_result ! negative, --skip --
+ ! 0 , passed
+ ! positive, failed
+
+ CHARACTER(LEN=*), INTENT(IN) :: test_title ! Short description of test
+ INTEGER, INTENT(INOUT) :: total_error ! Accumulated error
+
+! Controls the output style for reporting test results
+
+ CHARACTER(LEN=8) :: error_string
+ CHARACTER(LEN=8), PARAMETER :: success = ' PASSED '
+ CHARACTER(LEN=8), PARAMETER :: failure = '*FAILED*'
+ CHARACTER(LEN=8), PARAMETER :: skip = '--SKIP--'
+
+ error_string = failure
+ IF (test_result == 0) THEN
+ error_string = success
+ ELSE IF (test_result == -1) THEN
+ error_string = skip
+ ENDIF
+
+ WRITE(*, fmt = '(A, T72, A)') test_title, error_string
+
+ IF(test_result.GT.0) total_error = total_error + test_result
+
+ END SUBROUTINE write_test_status
+
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: check
+!DEC$endif
SUBROUTINE check(string,error,total_error)
CHARACTER(LEN=*) :: string
INTEGER :: error, total_error