get_name(i) should return a non-empty string for representative indices.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_035(id, nfail) use forcolormap_info, only: cmap_info integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "cmap_info: get_name non-empty for sample indices" 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_trim(s) > 0) s = trim(cmap_info%get_name((n+1)/2)) ok = ok .and. (len_trim(s) > 0) s = trim(cmap_info%get_name(n)) ok = ok .and. (len_trim(s) > 0) call report_test(name, ok, id, nfail) end subroutine test_035