unit_test_bad(3f) - [M_verify] call command "goodbad NAME bad" and stop program (LICENSE:PD)
Synopsis
Description
Examples
Author
License
subroutine unit_test_bad(name,opts,msg)
character(len=*),intent(in) :: name character(len=*),intent(in),optional :: opts character(len=*),intent(in),optional :: msg
unit_test_bad(3f) calls the shell command
goodbad NAME bad [opts]and stops the program. It is just a shortcut for calling call unit_test(name,.false.) call unit_test_done(name,opts,msg)
Sample program:
program demo_unit_test_bad use M_verify, only: unit_test_start use M_verify, only: unit_test use M_verify, only: unit_test_good, unit_test_badimplicit none integer :: x x=10 call unit_test_start(myroutine)
call unit_test(myroutine, x > 3 ,test if big enough) call unit_test(myroutine, x < 100 ,test if small enough)
if(x /= 0)then call unit_test_bad (myroutine,msg=checks on "myroutine" failed) ! program execution stopped endif
end program demo_unit_test_bad
John S. Urban
Public Domain
Nemo Release 3.1 | unit_test_bad (3) | June 29, 2025 |