unit_test_i0 Subroutine

private subroutine unit_test_i0(this, res, expected, msg, name, group)

Type Bound

unit_test

Arguments

Type IntentOptional Attributes Name
class(unit_test), intent(inout) :: this
integer, intent(in) :: res
integer, intent(in) :: expected
character(len=*), intent(in), optional :: msg
character(len=*), intent(in), optional :: name
character(len=*), intent(in), optional :: group

Calls

proc~~unit_test_i0~~CallsGraph proc~unit_test_i0 unit_test%unit_test_i0 proc~print_msg unit_test%print_msg proc~unit_test_i0->proc~print_msg colorize colorize proc~print_msg->colorize

Called by

proc~~unit_test_i0~~CalledByGraph proc~unit_test_i0 unit_test%unit_test_i0 none~check unit_test%check none~check->proc~unit_test_i0 program~demo_forunittest demo_forunittest program~demo_forunittest->none~check program~demo_old demo_old program~demo_old->none~check program~test1 test1 program~test1->none~check program~test2 test2 program~test2->none~check

Source Code

   subroutine unit_test_i0(this, res, expected, msg, name, group)
      class(unit_test), intent(inout) :: this
      integer, intent(in) :: res, expected
      character(*), intent(in), optional :: msg
      character(len=*), optional, intent(in) :: name
      character(len=*), optional, intent(in) :: group

      if (present(name)) then
         this%name = name
      else
         this%name = 'none'
      end if

      if (present(msg)) then
         this%msg = msg
      else
         this%msg = 'none'
      end if

      if (present(group)) then
         this%group = group
      else
         this%group = 'none'
      end if
      this%result = res == expected

      call this%print_msg(this%result)
   end subroutine unit_test_i0