summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/test/fflush1.f904
-rw-r--r--fortran/test/fflush2.f904
-rw-r--r--fortran/test/fortranlib_test.f904
3 files changed, 12 insertions, 0 deletions
diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.f90
index a529eef..998ee5a 100644
--- a/fortran/test/fflush1.f90
+++ b/fortran/test/fflush1.f90
@@ -144,6 +144,10 @@
CALL H5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
CALL check("h5fflush_f",error,total_error)
+ ! if errors detected, exit with non-zero code. This is not truly fortran
+ ! standard but likely supported by most fortran compilers.
+ IF (total_error .ne. 0) CALL exit (total_error)
+
001 STOP
diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90
index 41b94cb..bda9d07 100644
--- a/fortran/test/fflush2.f90
+++ b/fortran/test/fflush2.f90
@@ -177,4 +177,8 @@
CALL h5close_f(error)
CALL check("h5close_types_f",error,total_error)
+ ! if errors detected, exit with non-zero code. This is not truly fortran
+ ! standard but likely supported by most fortran compilers.
+ IF (total_error .ne. 0) CALL exit (total_error)
+
END PROGRAM FFLUSH2EXAMPLE
diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.f90
index 41398b7..d90fcba 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.f90
@@ -276,6 +276,10 @@
CALL h5close_f(error)
+ ! if errors detected, exit with non-zero code. This is not truly fortran
+ ! standard but likely supported by most fortran compilers.
+ IF (total_error .ne. 0) CALL exit (total_error)
+
END PROGRAM fortranlibtest