summaryrefslogtreecommitdiffstats
path: root/fortran/test/tf.f90
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2008-09-30 16:42:10 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2008-09-30 16:42:10 (GMT)
commitfe1ca64d1672af7859c38c143b77533a14c518ec (patch)
treebbee085742020b59a4b6136f277c6dd4a0bc8de0 /fortran/test/tf.f90
parentf361635ae5f344bc80aade6432e80bcf1647522b (diff)
downloadhdf5-fe1ca64d1672af7859c38c143b77533a14c518ec.zip
hdf5-fe1ca64d1672af7859c38c143b77533a14c518ec.tar.gz
hdf5-fe1ca64d1672af7859c38c143b77533a14c518ec.tar.bz2
[svn-r15727]
Maintenance: Merged new Fortran Features and tests from trunk into hdf5_1_8 branch (used svn merge -r 14941:14525 http://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran command).
Diffstat (limited to 'fortran/test/tf.f90')
-rw-r--r--fortran/test/tf.f9042
1 files changed, 41 insertions, 1 deletions
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