Register a new unit test
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Name of the test |
||
procedure(test_interface) | :: | test |
Entry point for the test |
|||
logical, | intent(in), | optional | :: | should_fail |
Whether test is supposed to error or not |
Newly registered test
function new_unittest(name, test, should_fail) result(self) !> Name of the test character(len=*), intent(in) :: name !> Entry point for the test procedure(test_interface) :: test !> Whether test is supposed to error or not logical, intent(in), optional :: should_fail !> Newly registered test type(unittest_type) :: self self%name = name self%test => test if (present(should_fail)) self%should_fail = should_fail end function new_unittest