If zmin>zmax, set() should swap the bounds into ascending order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_039(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "Colormap%set: swaps zmin/zmax when zmin>zmax" logical :: ok type(Colormap) :: cm real(wp), parameter :: tol = 1.0e-12_wp call cm%set("viridis", 2.0_wp, -3.0_wp) ok = (abs(cm%get_zmin() - (-3.0_wp)) <= tol) .and. (abs(cm%get_zmax() - 2.0_wp) <= tol) call report_test(name, ok, id, nfail) end subroutine test_039