test_050 Subroutine

subroutine test_050(id, nfail)

Uses

  • proc~~test_050~~UsesGraph proc~test_050 test_050 module~forcolormap_info forcolormap_info proc~test_050->module~forcolormap_info 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 module~forcolormap_parameters forcolormap_parameters module~forcolormap_info->module~forcolormap_parameters module~forcolormap_cm_matplotlib->module~forcolormap_parameters module~forcolormap_cm_miscellaneous->module~forcolormap_parameters module~forcolormap_cm_scientific->module~forcolormap_parameters iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env

Ensure cmap_info includes known entries and their expected level counts.

Arguments

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

Calls

proc~~test_050~~CallsGraph proc~test_050 test_050 proc~get_levels~2 Colormaps_info%get_levels proc~test_050->proc~get_levels~2 proc~get_name~2 Colormaps_info%get_name proc~test_050->proc~get_name~2 proc~get_ncolormaps Colormaps_info%get_ncolormaps proc~test_050->proc~get_ncolormaps proc~report_test report_test proc~test_050->proc~report_test

Called by

proc~~test_050~~CalledByGraph proc~test_050 test_050 program~check check program~check->proc~test_050

Source Code

   subroutine test_050(id, nfail)
      use forcolormap_info, only: cmap_info
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "cmap_info has acton(256) and acton10(10)"
      logical :: ok
      integer :: i, n, ia, ia10

      n    = cmap_info%get_ncolormaps()
      ia   = 0
      ia10 = 0

      do i = 1, n
         if (trim(cmap_info%get_name(i)) == "acton")   ia   = i
         if (trim(cmap_info%get_name(i)) == "acton10") ia10 = i
      end do

      ok = (n == 232) .and. (ia > 0) .and. (ia10 > 0) .and. &
         (cmap_info%get_levels(ia) == 256) .and. &
         (cmap_info%get_levels(ia10) == 10)

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