assert_positive_r32_1 Subroutine

private subroutine assert_positive_r32_1(this, r)

Check if a real (32 bits) array (rank 1) is positive.

Type Bound

tester_t

Arguments

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

The tester.

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

Value to check.


Called by

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

    this% n_tests = this% n_tests + 1

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

  end subroutine assert_positive_r32_1