Manual Reference Pages  - unit_test_msg (3m_framework__verify)

NAME

unit_test_msg(3f) - [M_framework__verify] converts up to twenty standard scalar values to a message for unit testing (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

function unit_test_msg(name, msg, & & g1,g2,g3,g4,g5,g6,g7,g8,g9,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,if)

    character(len=*),intent(in)  :: name
    class(*),intent(in),optional :: msg, &
    & g1,g2,g3,g4,g5,g6,g7,g8,g9,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj

DESCRIPTION

unit_test_msg(3f) builds a string from up to twenty scalar values and prints it to the error log.

OPTIONS

name name of unit being tested
msg,g[1-j]
  optional values to print the value of. May be of type INTEGER, LOGICAL, REAL, DOUBLEPRECISION, COMPLEX, or CHARACTER.
if expression must be true or message is not output. Must be specified by keyword as "if=expression".

EXAMPLES

Sample program:

   program demo_unit_test_msg
   use M_framework, only : unit_test_start,unit_test_msg, &
           & unit_test_end
   implicit none

call unit_test_start(’myroutine’) call unit_test_msg(’myroutine’,’HUGE(3f) integers’, & & huge(0),’and real’,huge(0.0),’and double’,huge(0.0d0)) call unit_test_msg(’myroutine’,’real :’, & & huge(0.0),0.0,12345.6789,tiny(0.0) ) call unit_test_msg(’myroutine’,’doubleprecision :’, & & huge(0.0d0),0.0d0,12345.6789d0,tiny(0.0d0) ) call unit_test_msg(’myroutine’,’complex :’, & & cmplx(huge(0.0),tiny(0.0)) ) call unit_test_end(’myroutine’)

end program demo_unit_test_msg

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 unit_test_msg (3m_framework__verify) December 12, 2023
Generated by manServer 1.08 from 42e2941d-3e23-40fc-b0a4-1e634bc43f56 using man macros.