assert_positive_i8 Subroutine

private subroutine assert_positive_i8(this, i)

Check if a integer (32 bits) is positive.

Type Bound

tester_t

Arguments

Type IntentOptional Attributes Name
class(tester_t), intent(inout) :: this

The tester.

integer(kind=int8), intent(in) :: i

Value to check.


Called by

proc~~assert_positive_i8~~CalledByGraph proc~assert_positive_i8 tester::tester_t%assert_positive_i8 none~assert_positive tester::tester_t%assert_positive none~assert_positive->proc~assert_positive_i8 program~test_tester_05 test_tester_05 program~test_tester_05->none~assert_positive program~test_tester_1 test_tester_1 program~test_tester_1->none~assert_positive

Source Code

  subroutine assert_positive_i8(this, i)
    class(tester_t), intent(inout)        :: this !< The tester.
    integer(int8),   intent(in)           :: i    !< Value to check.

    this% n_tests = this% n_tests + 1
    if (i < 0) then
       this% n_errors = this% n_errors + 1
    end if

  end subroutine assert_positive_i8