Skip to content

Commit 4a59950

Browse files
committed
unit test update
1 parent 61cbad1 commit 4a59950

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tests/jf_test_46.F90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ subroutine test_46(error_cnt)
3030
logical(LK) :: found
3131
integer(IK) :: ival
3232
real(RK) :: rval
33+
real :: r32val
3334
logical(LK) :: lval
3435
character(kind=CK,len=:),allocatable :: cval
3536
character(kind=CK,len=1),dimension(:),allocatable :: cvec
@@ -59,6 +60,12 @@ subroutine test_46(error_cnt)
5960
error_cnt = error_cnt + 1
6061
end if
6162

63+
call json%get(p, CK_'not_there', r32val, found, default=99.0) ! real32
64+
if (json%failed() .or. found .or. r32val-99.0>0.0) then
65+
write(error_unit,'(A)') 'Error using json_get_real_by_path default'
66+
error_cnt = error_cnt + 1
67+
end if
68+
6269
call json%get(p, CK_'not_there', rval, found, default=99.0_RK)
6370
if (json%failed() .or. found .or. rval-99.0_RK>0.0_RK) then
6471
write(error_unit,'(A)') 'Error using json_get_real_by_path default'

0 commit comments

Comments
 (0)