Integer scaling should respect a nontrivial target range [10,20].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_020(id, nfail) use forcolormap_parameters, only: wp use forcolormap_utils, only: scale integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "scale(real,int): nontrivial integer range [10,20]" logical :: ok real(wp) :: x(3) integer :: y(3) x = [ -1.0_wp, 0.0_wp, 1.0_wp ] y = scale(x, 10, 20) ok = (y(1) == 10) .and. (y(3) == 20) .and. (y(2) >= 10) .and. (y(2) <= 20) call report_test(name, ok, id, nfail) end subroutine test_020