Ensure cmap_info does not contain duplicate colormap names.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_086(id, nfail) use forcolormap_info, only: cmap_info integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "cmap_info: all colormap names are unique (no duplicates)" logical :: ok integer :: i, j, n character(len=:), allocatable :: ni, nj n = cmap_info%get_ncolormaps() ok = .true. do i = 1, n ni = trim(cmap_info%get_name(i)) do j = i + 1, n nj = trim(cmap_info%get_name(j)) if (ni == nj) then ok = .false. exit end if end do if (.not. ok) exit end do call report_test(name, ok, id, nfail) end subroutine test_086