mirror of
https://github.com/pfloos/quack
synced 2024-12-23 04:43:53 +01:00
full string print in test
This commit is contained in:
parent
78cb8f30b4
commit
09992dba9d
@ -13,6 +13,7 @@ subroutine check_test_value(branch)
|
|||||||
double precision :: reference
|
double precision :: reference
|
||||||
character(len=15) :: answer
|
character(len=15) :: answer
|
||||||
|
|
||||||
|
logical :: failed
|
||||||
double precision,parameter :: cutoff = 1d-10
|
double precision,parameter :: cutoff = 1d-10
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
@ -38,10 +39,12 @@ subroutine check_test_value(branch)
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
failed = .false.
|
||||||
|
|
||||||
write(*,*) '----------------------------------------------------------------------------------------------------'
|
write(*,*) '----------------------------------------------------------------------------------------------------'
|
||||||
do
|
do
|
||||||
|
|
||||||
read(11,*,end=11) description
|
read(11,'(A30)',end=11) description
|
||||||
read(11,'(F20.15)',end=11) value
|
read(11,'(F20.15)',end=11) value
|
||||||
|
|
||||||
read(12,*,end=12)
|
read(12,*,end=12)
|
||||||
@ -51,6 +54,7 @@ subroutine check_test_value(branch)
|
|||||||
answer = '..... [SUCCESS]'
|
answer = '..... [SUCCESS]'
|
||||||
else
|
else
|
||||||
answer = '..... [FAILED] '
|
answer = '..... [FAILED] '
|
||||||
|
failed = .true.
|
||||||
end if
|
end if
|
||||||
write(*,'(1X,A1,1X,A30,1X,A1,1X,3F15.10,1X,A1,1X,A15,1X,A1)') &
|
write(*,'(1X,A1,1X,A30,1X,A1,1X,3F15.10,1X,A1,1X,A15,1X,A1)') &
|
||||||
'|',description,'|',value,reference,abs(value-reference),'|',answer,'|'
|
'|',description,'|',value,reference,abs(value-reference),'|',answer,'|'
|
||||||
@ -61,5 +65,11 @@ subroutine check_test_value(branch)
|
|||||||
12 close(unit=12)
|
12 close(unit=12)
|
||||||
|
|
||||||
write(*,*) '----------------------------------------------------------------------------------------------------'
|
write(*,*) '----------------------------------------------------------------------------------------------------'
|
||||||
|
if(failed) then
|
||||||
|
write(*,'(3X,A30)') ' :-( Tests have failed :-( '
|
||||||
|
else
|
||||||
|
write(*,'(3X,A30)') ' :-) Tests have succeeded :-) '
|
||||||
|
end if
|
||||||
|
write(*,*) '----------------------------------------------------------------------------------------------------'
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user