test_037 Subroutine

subroutine test_037(id, nfail)

Uses

  • proc~~test_037~~UsesGraph proc~test_037 test_037 module~forcolormap_info forcolormap_info proc~test_037->module~forcolormap_info module~forcolormap_parameters forcolormap_parameters proc~test_037->module~forcolormap_parameters module~forcolormap_info->module~forcolormap_parameters module~forcolormap_cm_matplotlib forcolormap_cm_matplotlib module~forcolormap_info->module~forcolormap_cm_matplotlib module~forcolormap_cm_miscellaneous forcolormap_cm_miscellaneous module~forcolormap_info->module~forcolormap_cm_miscellaneous module~forcolormap_cm_scientific forcolormap_cm_scientific module~forcolormap_info->module~forcolormap_cm_scientific iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env module~forcolormap_cm_matplotlib->module~forcolormap_parameters module~forcolormap_cm_miscellaneous->module~forcolormap_parameters module~forcolormap_cm_scientific->module~forcolormap_parameters

get_name(i) should not exceed the published maximum colormap_name_length.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: id
integer, intent(inout) :: nfail

Calls

proc~~test_037~~CallsGraph proc~test_037 test_037 proc~get_name~2 Colormaps_info%get_name proc~test_037->proc~get_name~2 proc~get_ncolormaps Colormaps_info%get_ncolormaps proc~test_037->proc~get_ncolormaps proc~report_test report_test proc~test_037->proc~report_test

Called by

proc~~test_037~~CalledByGraph proc~test_037 test_037 program~check check program~check->proc~test_037

Source Code

   subroutine test_037(id, nfail)
      use forcolormap_info,       only: cmap_info
      use forcolormap_parameters, only: colormap_name_length
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "cmap_info: get_name length <= colormap_name_length"
      logical :: ok
      integer :: n
      character(len=:), allocatable :: s

      n = cmap_info%get_ncolormaps()
      ok = .true.

      s = trim(cmap_info%get_name(1))
      ok = ok .and. (len(s) <= colormap_name_length)

      s = trim(cmap_info%get_name((n+1)/2))
      ok = ok .and. (len(s) <= colormap_name_length)

      s = trim(cmap_info%get_name(n))
      ok = ok .and. (len(s) <= colormap_name_length)

      call report_test(name, ok, id, nfail)
   end subroutine test_037