create() should swap bounds when called with zmin>zmax, even after finalize().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_060(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "create(discrete, zmin>zmax) swaps bounds" logical :: ok type(Colormap) :: cmap integer, dimension(0:6, 3) :: test_colormap real(wp), parameter :: tol = 1.0e-12_wp test_colormap = reshape([ & 1, 2, 3, & 4, 5, 6, & 7, 8, 9, & 0, 0, 0, & 9, 8, 7, & 6, 5, 4, & 3, 2, 1 ], shape(test_colormap), order=[2,1]) call cmap%finalize() call cmap%create("discrete", 2.0_wp, 0.0_wp, test_colormap) call cmap%print_status() ok = (abs(cmap%get_zmin() - 0.0_wp) <= tol) .and. (abs(cmap%get_zmax() - 2.0_wp) <= tol) call report_test(name, ok, id, nfail) end subroutine test_060