Select a unit test from all available tests
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unittest_type) | :: | tests(:) |
Available unit tests |
|||
character(len=*), | intent(in) | :: | name |
Name identifying the test suite |
Selected test suite
function select_test(tests, name) result(pos) !> Name identifying the test suite character(len=*), intent(in) :: name !> Available unit tests type(unittest_type) :: tests(:) !> Selected test suite integer :: pos integer :: it pos = 0 do it = 1, size(tests) if (name == tests(it)%name) then pos = it exit end if end do end function select_test