unit_check_done(3f) - [M_verify] call command "goodbad NAME good" or "goodbad NAME bad" depending on whether failures were found (LICENSE:PD)
Synopsis
Description
Examples
Author
License
subroutine unit_check_done(name,opts,msg)
character(len=*),intent(in) :: name character(len=*),intent(in),optional :: opts character(len=*),intent(in),optional :: msg
If there have been no failures the shell command
goodbad NAME good [opts]is executed, else the command
goodbad NAME bad [opts]is executed and by default stops the program if their have been any failures.
Sample program:
program demo_unit_check_done use M_verify, only: unit_check_start use M_verify, only: unit_check use M_verify, only: unit_check_good, unit_check_done, unit_check_badimplicit none integer :: x x=10 call unit_check_start(’myroutine’)
call unit_check(’myroutine’, x > 3 ,’test if big enough’) call unit_check(’myroutine’, x < 100 ,’test if small enough’)
if(x /= 0)then call unit_check_done (’myroutine’,msg=’checks on "myroutine"’ ) ! program execution stopped endif
end program demo_unit_check_done
John S. Urban
Public Domain