Define an abstraction for describing test results the test description and, if the test was not skipped, then also a test diagnosis.
The result is a test_result_t object with the components defined by the dummy arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | description | |||
| type(test_diagnosis_t), | intent(in), | optional | :: | diagnosis |
The result is a test_result_t object with the components defined by the dummy arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_t), | intent(in) | :: | description | |||
| type(test_diagnosis_t), | intent(in), | optional | :: | diagnosis |
Print a description of the test, its outcome, and diagnostic information if the test fails
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(test_result_t), | intent(in) | :: | self |
The result is true if and only if the test description contains the substring
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(test_result_t), | intent(in) | :: | self | |||
| character(len=*), | intent(in) | :: | substring |
The result is true if and only if the test description contains the substring
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(test_result_t), | intent(in) | :: | self | |||
| type(string_t), | intent(in) | :: | substring |
The result is true if and only if the test passed on all images
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(test_result_t), | intent(in) | :: | self |
The result is true if and only if the test result contains no diagnosis on any image
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(test_result_t), | intent(in) | :: | self |
Encapsulate a test-description string and optionally a test diagnosis. This type is similar to test_description_t and test_diagnosis_t type but 1. Doesn't need the former's procedure(diagnosis_function_i) component and 2. Allocates an instance of the latter if and only if the test wasn't skipped.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(string_t), | private | :: | description_ | ||||
| type(test_diagnosis_t), | private, | allocatable | :: | diagnosis_ |
| private elemental, module function construct_from_character (description, diagnosis) | The result is a test_result_t object with the components defined by the dummy arguments |
| private elemental, module function construct_from_string (description, diagnosis) | The result is a test_result_t object with the components defined by the dummy arguments |
| procedure, public :: co_characterize | |
| generic, public :: description_contains => description_contains_string, description_contains_characters | |
| procedure, public :: passed | |
| procedure, public :: skipped | |
| procedure, private :: description_contains_characters | |
| procedure, private :: description_contains_string |