test_is_digit Subroutine

public subroutine test_is_digit()

Arguments

None

Calls

proc~~test_is_digit~~CallsGraph proc~test_is_digit test_is_digit assertfalse assertfalse proc~test_is_digit->assertfalse asserttrue asserttrue proc~test_is_digit->asserttrue proc~is_digit is_digit proc~test_is_digit->proc~is_digit

Source Code

   subroutine test_is_digit()
      integer :: i = -1
      integer, parameter :: imin = 0
      integer, parameter :: imax = 127
      integer, parameter :: i1 = iachar('0') - 1
      integer, parameter :: i2 = iachar('9') + 1
      integer, parameter :: acodes(*) = [(i, i = imin, i1), (i, i = i2, imax)]
      integer :: i0 = iachar('0')

      do i = 0, 9
         @assertTrue(is_digit(achar(i0+i)))
      end do

      do i = 1, size(acodes)
         @assertFalse(is_digit(achar(acodes(i))))
      end do

   end subroutine test_is_digit