Define abstractions, defined operations, and procedures for writing correctness checks in the form of assertions and tests.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | default_real | = | kind(1.) | |
integer, | private, | parameter | :: | double_precision | = | kind(1D0) |
Use cases: 1. When invoked via the generic interface, the preprocessor passes the 'file' and 'line' dummy arguments automatically. 2. When invoked directly, there is 1 argument: an expression containing defined operations such as 1 .equalsExpected. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | test_diagnosis | |||
character(len=*), | intent(in), | optional | :: | file | ||
integer, | intent(in), | optional | :: | line |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(..) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:,:,:,:,:,:,:,:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | diagnoses(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | lhs | |||
type(test_diagnosis_t), | intent(in) | :: | rhs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_floor |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_floor |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_floor |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_min |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_ceiling |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_ceiling |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_ceiling |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
double precision, | intent(in) | :: | actual | |||
double precision, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | actual | |||
integer, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | actual | |||
real, | intent(in) | :: | expected_max |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t(double_precision)), | intent(in) | :: | operands | |||
double precision, | intent(in) | :: | tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t), | intent(in) | :: | operands | |||
real, | intent(in) | :: | tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t(double_precision)), | intent(in) | :: | operands | |||
double precision, | intent(in) | :: | fractional_tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t), | intent(in) | :: | operands | |||
real, | intent(in) | :: | fractional_tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t(double_precision)), | intent(in) | :: | operands | |||
double precision, | intent(in) | :: | percentage_tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(operands_t), | intent(in) | :: | operands | |||
real, | intent(in) | :: | percentage_tolerance |
The result is a test_diagnosis_t object with the components defined by the dummy arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | test_passed | |||
character(len=*), | intent(in) | :: | diagnostics_string |
The result is a test_diagnosis_t object with the components defined by the dummy arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | test_passed | |||
type(string_t), | intent(in) | :: | diagnostics_string |
The result is a string describing the condition(s) that caused a test failure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(test_diagnosis_t), | intent(in) | :: | self |
The result is .true. if the test passed and false otherwise
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(test_diagnosis_t), | intent(in) | :: | self |
Encapsulate test outcome and diagnostic information
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | private, | allocatable | :: | diagnostics_string_ | |||
logical, | private | :: | test_passed_ |
private elemental, module function construct_from_character (test_passed, diagnostics_string) | The result is a test_diagnosis_t object with the components defined by the dummy arguments |
private elemental, module function construct_from_string_t (test_passed, diagnostics_string) | The result is a test_diagnosis_t object with the components defined by the dummy arguments |
procedure, public :: diagnostics_string | |
procedure, public :: test_passed |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
double precision, | public | :: | actual | ||||
double precision, | public | :: | expected |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=k), | public | :: | actual | ||||
real(kind=k), | public | :: | expected | ||||
integer, | public, | kind | :: | k | = | default_real |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | public | :: | actual | ||||
real, | public | :: | expected |