assert_positive_r32 Subroutine

private subroutine assert_positive_r32(this, r)

Check if a real (32 bits) is positive.

Type Bound

tester_t

Arguments

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

The tester.

real(kind=real32), intent(in) :: r

Value to check.


Called by

proc~~assert_positive_r32~~CalledByGraph proc~assert_positive_r32 tester::tester_t%assert_positive_r32 none~assert_positive tester::tester_t%assert_positive none~assert_positive->proc~assert_positive_r32 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_r32(this, r)
    class(tester_t), intent(inout)        :: this !< The tester.
    real(real32),    intent(in)           :: r    !< Value to check.

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

  end subroutine assert_positive_r32