C Library Functions  - unit_test_stop (3)

NAME

unit_test_stop(3f) - [M_verify] call command "goodbad NAME good" or goodbad NAME bad" depending on whether failures were found (LICENSE:PD)

CONTENTS

Synopsis
Description
Examples
Author
License

SYNOPSIS

subroutine unit_test_stop(name,opts,msg)

    character(len=*),intent(in) :: name
    character(len=*),intent(in),optional :: opts
    character(len=*),intent(in),optional :: msg

DESCRIPTION

give a tally of all calls to unit_test(3f)

EXAMPLES

Sample program:

    program demo_unit_test_stop
    use M_verify, only: unit_test_start, unit_test_done
    use M_verify, only: unit_test
    use M_verify, only: unit_test_good, unit_test_stop, unit_test_bad
    use M_verify, only: unit_test_command, unit_test_keep_going, unit_test_level

implicit none integer :: x

unit_test_command=’’ unit_test_keep_going=.true. unit_test_level=0

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=’x /= 0’ ) endif call unit_test_done (’myroutine’,msg=’checks on "myroutine"’ )

call unit_test_stop() end program demo_unit_test_stop

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 unit_test_stop (3) June 29, 2025
Generated by manServer 1.08 from 3c9c20ba-7263-4fb5-9d75-3768de6bbe50 using man macros.