Define an abstract test_t type with deferred bindings ("subject" and "results") used by a type-bound procedure ("report") for reporting test results. The "report" procedure thus represents an implementation of the Template Method pattern.
Print the test results and increment the tallies of passing tests, total tests, and skipped tests.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(test_t), | intent(in) | :: | test | |||
integer, | intent(inout) | :: | passes | |||
integer, | intent(inout) | :: | tests | |||
integer, | intent(inout) | :: | skips |
Construct an array of test results from a set of tests filtered for descriptions and subjects with the '--contains' flag's value if the flag was included on the command line at program launch.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(test_t), | intent(in) | :: | test | |||
type(test_description_t), | intent(in) | :: | test_descriptions(:) |
The result is an array of test results for subsequent reporting in the "report" type-bound procedure
The result is the name of the test specimen (the subject of testing)
Facilitate testing and test reporting
procedure, public :: report | |
procedure(results_interface), public, deferred, nopass :: results | |
procedure, public :: run | |
procedure(subject_interface), public, deferred, nopass :: subject |