unit_test_stop(3f) - [M_framework__verify] report tally of all checks and stop program (LICENSE:PD)
Synopsis
Description
Options
Examples
Author
License
subroutine unit_test_stop(msg,opts)
character(len=*),intent(in),optional :: msg character(len=*),intent(in),optional :: opts
give a tally of all calls to unit_test(3f) and stop program.
Tally up the test result totals and stop the program. If a command is set via unit_test_mode(3f) or the command line call it appending OPTS to the end of the command.
MSG additional message to display OPTS add string to filter command line if any is specified.
Sample program:
program demo_unit_test_stop use M_framework, only: unit_test_start, unit_test_end, & & unit_test, unit_test_stop, unit_test_mode use,intrinsic :: iso_fortran_env, stdout=>OUTPUT_UNIT implicit none integer :: x x=10 call unit_test_mode(luns=[stdout]) ! do a test call unit_test_start(proc1) call unit_test(proc1, x > 3 , if big enough) call unit_test(proc1, x < 100 , if small enough) call unit_test_end (proc1,msg=checks all done ) ! do another test call unit_test_start(proc2) call unit_test(proc2, x > 3 , if big enough) call unit_test(proc2, x < 100 , if small enough) call unit_test_end (proc2,msg=checks all done )! tally up test results and stop program call unit_test_stop()
end program demo_unit_test_stop
John S. Urban
Public Domain
Nemo Release 3.1 | unit_test_stop (3) | February 23, 2025 |