summaryrefslogtreecommitdiffstats
path: root/fortran/test/fortranlib_test.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2000-10-24 20:56:04 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2000-10-24 20:56:04 (GMT)
commit7e1be524fa6857146f8774d95d898a4b10202858 (patch)
treea72d47ae4cc4021190eb1b65b405d1146bcd1978 /fortran/test/fortranlib_test.f90
parentac1c2474525b5e96dd429b9fba4396b133ae2d4b (diff)
downloadhdf5-7e1be524fa6857146f8774d95d898a4b10202858.zip
hdf5-7e1be524fa6857146f8774d95d898a4b10202858.tar.gz
hdf5-7e1be524fa6857146f8774d95d898a4b10202858.tar.bz2
[svn-r2730]
Purpose: Bug fix. Description: fortranlib_test.f90 had a typo in the format string. Would not compile on O2K. Test did not check the length of the attribute name. Solution: Fixed format strings. Added more code to test returned attribute name length. Platforms tested: O2K, Linux
Diffstat (limited to 'fortran/test/fortranlib_test.f90')
-rw-r--r--fortran/test/fortranlib_test.f9076
1 files changed, 38 insertions, 38 deletions
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 2724dad..7e57b21 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -27,29 +27,29 @@
CHARACTER*8 error_string
CHARACTER*8 :: success = ' PASSED '
CHARACTER*8 :: failure = '*FAILED*'
- CHARACTER*2 :: e_format = "a8"
+ CHARACTER*4 :: e_format ='(8a)'
CALL h5init_types_f(error)
- write(*,*) '============================================================================='
+ write(*,*) ' ========================== '
write(*,*) ' FORTRAN tests '
- write(*,*) '============================================================================='
+ write(*,*) ' ========================== '
! write(*,*) '========================================='
! write(*,*) 'Testing FILE Interface '
! write(*,*) '========================================='
- write(*, fmt = '14a', advance = 'no') ' Mounting test'
- write(*, fmt = '57x', advance = 'no')
error_string = failure
CALL mountingtest(mounting_total_error)
IF (mounting_total_error == 0) error_string = success
+ write(*, fmt = '(14a)', advance = 'no') ' Mounting test'
+ write(*, fmt = '(57x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + mounting_total_error
- write(*, fmt = '12a', advance = 'no') ' Reopen test'
- write(*, fmt = '59x', advance = 'no')
error_string = failure
CALL reopentest(reopen_total_error)
IF (reopen_total_error == 0) error_string = success
+ write(*, fmt = '(12a)', advance = 'no') ' Reopen test'
+ write(*, fmt = '(59x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + reopen_total_error
@@ -59,19 +59,19 @@
! write(*,*) 'Testing DATASET Interface '
! write(*,*) '========================================='
- write(*, fmt = '13a', advance = 'no') ' Dataset test'
- write(*, fmt = '58x', advance = 'no')
error_string = failure
CALL datasettest(dataset_total_error)
IF (dataset_total_error == 0) error_string = success
+ write(*, fmt = '(13a)', advance = 'no') ' Dataset test'
+ write(*, fmt = '(58x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + dataset_total_error
- write(*, fmt = '24a', advance = 'no') ' Extendible dataset test'
- write(*, fmt = '47x', advance = 'no')
error_string = failure
CALL extenddsettest(extend_dataset_total_error)
IF (extend_dataset_total_error == 0) error_string = success
+ write(*, fmt = '(24a)', advance = 'no') ' Extendible dataset test'
+ write(*, fmt = '(47x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + extend_dataset_total_error
@@ -80,11 +80,11 @@
! write(*,*) 'Testing DATASPACE Interface '
! write(*,*) '========================================='
- write(*, fmt = '21a', advance = 'no') ' Basic dataspace test'
- write(*, fmt = '50x', advance = 'no')
error_string = failure
CALL dataspace_basic_test(dataspace_total_error)
IF (dataspace_total_error == 0) error_string = success
+ write(*, fmt = '(21a)', advance = 'no') ' Basic dataspace test'
+ write(*, fmt = '(50x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + dataspace_total_error
@@ -94,19 +94,19 @@
! write(*,*) 'Testing REFERENCE Interface '
! write(*,*) '========================================='
- write(*, fmt = '25a', advance = 'no') ' Reference to object test'
- write(*, fmt = '46x', advance = 'no')
error_string = failure
CALL refobjtest(refobj_total_error)
IF (refobj_total_error == 0) error_string = success
+ write(*, fmt = '(25a)', advance = 'no') ' Reference to object test'
+ write(*, fmt = '(46x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + refobj_total_error
- write(*, fmt = '33a', advance = 'no') ' Reference to dataset region test'
- write(*, fmt = '38x', advance = 'no')
error_string = failure
CALL refregtest(refreg_total_error)
IF (refreg_total_error == 0) error_string = success
+ write(*, fmt = '(33a)', advance = 'no') ' Reference to dataset region test'
+ write(*, fmt = '(38x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + refreg_total_error
@@ -115,27 +115,27 @@
! write(*,*) 'Testing selection functionalities '
! write(*,*) '========================================='
- write(*, fmt = '21a', advance = 'no') ' Basic selection test'
- write(*, fmt = '50x', advance = 'no')
error_string = failure
CALL test_basic_select(basic_select_total_error)
IF (basic_select_total_error == 0) error_string = success
+ write(*, fmt = '(21a)', advance = 'no') ' Basic selection test'
+ write(*, fmt = '(50x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + basic_select_total_error
- write(*, fmt = '25a', advance = 'no') ' Hyperslab selection test'
- write(*, fmt = '46x', advance = 'no')
error_string = failure
CALL test_select_hyperslab( hyperslab_total_error)
IF ( hyperslab_total_error == 0) error_string = success
+ write(*, fmt = '(25a)', advance = 'no') ' Hyperslab selection test'
+ write(*, fmt = '(46x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + hyperslab_total_error
- write(*, fmt = '23a', advance = 'no') ' Element selection test'
- write(*, fmt = '48x', advance = 'no')
error_string = failure
CALL test_select_element(element_total_error)
IF (element_total_error == 0) error_string = success
+ write(*, fmt = '(23a)', advance = 'no') ' Element selection test'
+ write(*, fmt = '(48x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + element_total_error
@@ -145,19 +145,19 @@
! write(*,*) 'Testing DATATYPE interface '
! write(*,*) '========================================='
- write(*, fmt = '20a', advance = 'no') ' Basic datatype test'
- write(*, fmt = '51x', advance = 'no')
error_string = failure
CALL basic_data_type_test(basic_datatype_total_error)
IF (basic_datatype_total_error == 0) error_string = success
+ write(*, fmt = '(20a)', advance = 'no') ' Basic datatype test'
+ write(*, fmt = '(51x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + basic_datatype_total_error
- write(*, fmt = '23a', advance = 'no') ' Compound datatype test'
- write(*, fmt = '48x', advance = 'no')
error_string = failure
CALL compoundtest(total_error_compoundtest)
IF (total_error_compoundtest == 0) error_string = success
+ write(*, fmt = '(23a)', advance = 'no') ' Compound datatype test'
+ write(*, fmt = '(48x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + total_error_compoundtest
@@ -166,11 +166,11 @@
! write(*,*) 'Testing PROPERTY interface '
! write(*,*) '========================================='
- write(*, fmt = '22a', advance = 'no') ' External dataset test'
- write(*, fmt = '49x', advance = 'no')
error_string = failure
CALL external_test(external_total_error)
IF (external_total_error == 0) error_string = success
+ write(*, fmt = '(22a)', advance = 'no') ' External dataset test'
+ write(*, fmt = '(49x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + external_total_error
@@ -179,10 +179,10 @@
! write(*,*) 'Testing ATTRIBUTE interface '
! write(*,*) '========================================='
- write(*, fmt = '15a', advance = 'no') ' Attribute test'
- write(*, fmt = '56x', advance = 'no')
error_string = failure
CALL attribute_test(attribute_total_error)
+ write(*, fmt = '(15a)', advance = 'no') ' Attribute test'
+ write(*, fmt = '(56x)', advance = 'no')
IF (attribute_total_error == 0) error_string = success
write(*, fmt = e_format) error_string
total_error = total_error + attribute_total_error
@@ -192,21 +192,21 @@
! write(*,*) 'Testing IDENTIFIER interface '
! write(*,*) '========================================='
- write(*, fmt = '16a', advance = 'no') ' Identifier test'
- write(*, fmt = '55x', advance = 'no')
error_string = failure
CALL identifier_test(identifier_total_error)
IF (identifier_total_error == 0) error_string = success
+ write(*, fmt = '(16a)', advance = 'no') ' Identifier test'
+ write(*, fmt = '(55x)', advance = 'no')
write(*, fmt = e_format) error_string
total_error = total_error + identifier_total_error
write(*,*)
- write(*,*) '============================================================================='
- write(*, fmt = "15x, 27a", advance='NO') ' FORTRAN tests completed with '
- write(*, fmt = "i4", advance='NO') total_error
- write(*, fmt = "12a" ) ' error(s) ! '
- 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_types_f(error)