assert_equal_l Subroutine

private subroutine assert_equal_l(this, l1, l2, fail)

Arguments

Type IntentOptional AttributesName
class(tester_t), intent(inout) :: this
logical, intent(in) :: l1
logical, intent(in) :: l2
logical, intent(in), optional :: fail

Source Code


Source Code

 subroutine assert_equal_l(this, l1, l2, fail)
    class(tester_t), intent(inout) :: this
    logical, intent(in) :: l1, l2
    logical, intent(in), optional :: fail

    this% n_tests = this% n_tests + 1
    if (l1 .neqv. l2) then
       if (.not. present(fail) .or. (present(fail) .and. fail .eqv. .false.)) then
          this% n_errors = this% n_errors + 1
       end if
    end if

  end subroutine assert_equal_l