If all control colors are identical, the generated map should be constant.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_026(id, nfail) use forcolormap_utils, only: lagrange integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "lagrange: constant control colors -> constant map" logical :: ok integer :: colors(3,3) integer, allocatable :: map(:,:) colors(1,:) = [ 7, 8, 9 ] colors(2,:) = [ 7, 8, 9 ] colors(3,:) = [ 7, 8, 9 ] map = lagrange(colors, 32) ok = all(map(:,1) == 7) .and. all(map(:,2) == 8) .and. all(map(:,3) == 9) call report_test(name, ok, id, nfail) end subroutine test_026