From f4d7edcec5004f8e2b8f6005738e896f1f4a3424 Mon Sep 17 00:00:00 2001 From: Ian Porter Date: Fri, 15 Feb 2019 23:08:29 -0500 Subject: [PATCH] Fix for undefined variable in test#26 Fixes the undefined variable error_cnt for test #26 when the json%validate returns a true is_valid statement. --- src/tests/jf_test_26.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/jf_test_26.F90 b/src/tests/jf_test_26.F90 index 721be7da99..f15b76af79 100644 --- a/src/tests/jf_test_26.F90 +++ b/src/tests/jf_test_26.F90 @@ -22,6 +22,8 @@ subroutine test_26(error_cnt) logical(lk) :: is_valid character(kind=CK,len=:),allocatable :: error_msg + error_cnt = 0 + call f%initialize() ! specify whatever init options you want. write(error_unit,'(A)') 'adding data to json_file...' @@ -76,7 +78,7 @@ program jf_test_26 use jf_test_26_mod , only: test_26 implicit none integer :: n_errors - n_errors = 0 + call test_26(n_errors) if (n_errors /= 0) stop 1