If no explicit name is provided, extract(levels) should annotate the name with the level count.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_076(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "extract(7) default name appends digits" logical :: ok type(Colormap) :: cm character(len=:), allocatable :: s call cm%set("viridis", 0.0_wp, 1.0_wp) call cm%extract(7) s = trim(cm%get_name()) ok = (cm%get_levels() == 7) .and. (index(s, "viridis") == 1) .and. (index(s, "7") > 0) call report_test(name, ok, id, nfail) end subroutine test_076