set() should select a known built-in map and preserve levels and bounds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_038(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "Colormap%set: viridis sets name, levels, zmin/zmax" logical :: ok type(Colormap) :: cm real(wp), parameter :: tol = 1.0e-12_wp call cm%set("viridis", 0.0_wp, 1.0_wp) ok = (trim(cm%get_name()) == "viridis") .and. & (cm%get_levels() == 256) .and. & abs(cm%get_zmin() - 0.0_wp) <= tol .and. & abs(cm%get_zmax() - 1.0_wp) <= tol call report_test(name, ok, id, nfail) end subroutine test_038