Check if two integers (64 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int64), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
subroutine assert_equal_i64(this, i1, i2, fail)
class(tester_t), intent(inout) :: this !< The tester.
integer(int64), intent(in) :: i1 !< Value to compare.
integer(int64), intent(in) :: i2 !< Value to compare.
logical, intent(in), optional :: fail !< Fail flag.
this% n_tests = this% n_tests + 1
if (i1 .ne. i2) 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_i64