Print a single test result.
Increments the global test counter id, prints a PASS/FAIL line,
and increments nfail when the test fails.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name | |||
| logical, | intent(in) | :: | ok | |||
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine report_test(name, ok, id, nfail) character(len=*), intent(in) :: name logical, intent(in) :: ok integer, intent(inout) :: id, nfail id = id + 1 if (ok) then write(*,'("[",i3.3,"] PASSED ",a)') id, name else write(*,'("[",i3.3,"] FAILED ",a)') id, name nfail = nfail + 1 end if end subroutine report_test