set(reverse=.false.) must not reverse and must not append the "_reverse" suffix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_083(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "set(reverse=.false.) leaves viridis unchanged (no suffix, endpoints same)" logical :: ok type(Colormap) :: a, b integer :: r0a, g0a, b0a, rLa, gLa, bLa integer :: r0b, g0b, b0b, rLb, gLb, bLb integer :: n call a%set("viridis", 0.0_wp, 1.0_wp) n = a%get_levels() call a%get_RGB(0, r0a, g0a, b0a) call a%get_RGB(n-1, rLa, gLa, bLa) call b%set("viridis", 0.0_wp, 1.0_wp, reverse=.false.) call b%get_RGB(0, r0b, g0b, b0b) call b%get_RGB(n-1, rLb, gLb, bLb) ok = (trim(b%get_name()) == "viridis") .and. (index(trim(b%get_name()), "_reverse") == 0) .and. & (r0b == r0a) .and. (g0b == g0a) .and. (b0b == b0a) .and. & (rLb == rLa) .and. (gLb == gLa) .and. (bLb == bLa) call report_test(name, ok, id, nfail) end subroutine test_083