diff options
author | cvs2svn <no_author@cvs2svn> | 2001-11-27 18:14:37 (GMT) |
---|---|---|
committer | cvs2svn <no_author@cvs2svn> | 2001-11-27 18:14:37 (GMT) |
commit | 3d5df75dada2c096ec27da976f5da0a28d961468 (patch) | |
tree | a6a8cc73ab40aac9d3b301659b70f5b5b2c2daee /fortran/test | |
parent | 8b869685cbb2e9725793c9051f85ae9f9b1e8829 (diff) | |
download | hdf5-3d5df75dada2c096ec27da976f5da0a28d961468.zip hdf5-3d5df75dada2c096ec27da976f5da0a28d961468.tar.gz hdf5-3d5df75dada2c096ec27da976f5da0a28d961468.tar.bz2 |
[svn-r4648] This commit was manufactured by cvs2svn to create branch 'hdf5_1_4'.
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/tH5E.f90 | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.f90 new file mode 100644 index 0000000..c14b101 --- /dev/null +++ b/fortran/test/tH5E.f90 @@ -0,0 +1,44 @@ + SUBROUTINE error_report_test(total_error) + +!THis subroutine tests following functionalities: h5eprint_f + + USE HDF5 ! This module contains all necessary modules + + IMPLICIT NONE + INTEGER, INTENT(OUT) :: total_error + + CHARACTER(LEN=9), PARAMETER :: filename = "etestf.h5" ! File name + CHARACTER(LEN=12), PARAMETER :: err_file_name = "err_file.tmp"! Error output file + + + + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HID_T) :: grp_id ! Group identifier + INTEGER :: error, tmp_error, err_flag + + err_flag = 0 + CALL h5eset_auto_f(err_flag, error) + CALL check("h5eprint_f",error, total_error) + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error) + CALL check("h5fcreate_f",error,total_error) + + ! + ! Try to open non-existing group in the file. + ! Error message should go to the err_file_name file. + ! + CALL h5gopen_f(file_id, "Doesnotexist1", grp_id, tmp_error) + CALL h5eprint_f(error, err_file_name) + CALL h5gopen_f(file_id, "Doesnotexist2", grp_id, tmp_error) + CALL h5eprint_f(error, err_file_name) + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + RETURN + END SUBROUTINE error_report_test |