Lagrange colormap generator should honor an explicit levels argument.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_023(id, nfail) use forcolormap_utils, only: lagrange integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "lagrange: explicit levels respected" logical :: ok integer :: colors(2,3) integer, allocatable :: map(:,:) integer :: levels_ levels_ = 17 colors(1,:) = [ 0, 0, 0 ] colors(2,:) = [ 255, 255, 255 ] map = lagrange(colors, levels_) ok = (size(map,1) == levels_) .and. (size(map,2) == 3) call report_test(name, ok, id, nfail) end subroutine test_023