test_081 Subroutine

subroutine test_081(id, nfail)

Uses

  • proc~~test_081~~UsesGraph proc~test_081 test_081 module~forcolormap forcolormap proc~test_081->module~forcolormap module~forcolormap_cm_matplotlib forcolormap_cm_matplotlib module~forcolormap->module~forcolormap_cm_matplotlib module~forcolormap_cm_miscellaneous forcolormap_cm_miscellaneous module~forcolormap->module~forcolormap_cm_miscellaneous module~forcolormap_cm_scientific forcolormap_cm_scientific module~forcolormap->module~forcolormap_cm_scientific module~forcolormap_info forcolormap_info module~forcolormap->module~forcolormap_info module~forcolormap_parameters forcolormap_parameters module~forcolormap->module~forcolormap_parameters module~forcolormap_utils forcolormap_utils module~forcolormap->module~forcolormap_utils module~forcolormap_cm_matplotlib->module~forcolormap_parameters module~forcolormap_cm_miscellaneous->module~forcolormap_parameters module~forcolormap_cm_scientific->module~forcolormap_parameters module~forcolormap_info->module~forcolormap_cm_matplotlib module~forcolormap_info->module~forcolormap_cm_miscellaneous module~forcolormap_info->module~forcolormap_cm_scientific module~forcolormap_info->module~forcolormap_parameters iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env module~forcolormap_utils->module~forcolormap_parameters

create_lagrange(levels<=0) should trigger validation and fall back to a safe default (256).

Arguments

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

Calls

proc~~test_081~~CallsGraph proc~test_081 test_081 proc~create_lagrange Colormap%create_lagrange proc~test_081->proc~create_lagrange proc~get_levels Colormap%get_levels proc~test_081->proc~get_levels proc~print_status Colormap%print_status proc~test_081->proc~print_status proc~report_test report_test proc~test_081->proc~report_test proc~assign_map Colormap%assign_map proc~create_lagrange->proc~assign_map proc~check Colormap%check proc~create_lagrange->proc~check proc~lagrange lagrange proc~create_lagrange->proc~lagrange proc~reverse Colormap%reverse proc~create_lagrange->proc~reverse proc~find_index Colormaps_info%find_index proc~check->proc~find_index proc~get_levels~2 Colormaps_info%get_levels proc~check->proc~get_levels~2 proc~lagrange_poly lagrange_poly proc~lagrange->proc~lagrange_poly

Called by

proc~~test_081~~CalledByGraph proc~test_081 test_081 program~check check program~check->proc~test_081

Source Code

   subroutine test_081(id, nfail)
      use forcolormap, only: Colormap, wp
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "create_lagrange(levels=0) -> levels fixed to 256 (check case 4)"
      logical :: ok
      type(Colormap) :: cm
      integer :: colors(2,3)

      colors(1,:) = [ 0, 0, 0 ]
      colors(2,:) = [ 255, 255, 255 ]

      call cm%create_lagrange("bad_levels", 0.0_wp, 1.0_wp, colors, 0)
      call cm%print_status()

      ok = (cm%get_levels() == 256)
      call report_test(name, ok, id, nfail)
   end subroutine test_081