The main tester class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | public | :: | n_errors | = | 0_int32 | Number of errors. |
|
integer(kind=int32), | public | :: | n_tests | = | 0_int32 | Number of tests. |
|
real(kind=real32), | public | :: | tolerance32 | = | 2._real32*epsilon(1._real32) | Real tolerance, 32 bits. |
|
real(kind=real64), | public | :: | tolerance64 | = | 2._real64*epsilon(1._real64) | Real tolerance, 64 bits. |
Initialize the tester.
Initialize the tester.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(out) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | optional | :: | tolerance32 | Real tolerance, 32 bits. |
|
real(kind=real64), | intent(in), | optional | :: | tolerance64 | Real tolerance, 64 bits. |
Print tests results.
Check if two values (integer, real or logical) are equal.
Check if two integers (8 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int8), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (16 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int16), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (32 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int32), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (64 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int64), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (32 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real32), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (64 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real64), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two logicals are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
logical, | intent(in) | :: | l1 | Value to compare. |
||
logical, | intent(in) | :: | l2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (8 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int8), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (16 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int16), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (32 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int32), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (64 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int64), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (32 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real32), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (64 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two logical arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
logical, | intent(in), | dimension(:) | :: | l1 | Value to compare. |
|
logical, | intent(in), | dimension(:) | :: | l2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (8 bits) are equal.
Check if two integers (8 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int8), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (16 bits) are equal.
Check if two integers (16 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int16), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (32 bits) are equal.
Check if two integers (32 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int32), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integers (64 bits) are equal.
Check if two integers (64 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in) | :: | i1 | Value to compare. |
||
integer(kind=int64), | intent(in) | :: | i2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (32 bits) are equal.
Check if two reals (32 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real32), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (64 bits) are equal.
Check if two reals (64 bits) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real64), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two logicals are equal.
Check if two logicals are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
logical, | intent(in) | :: | l1 | Value to compare. |
||
logical, | intent(in) | :: | l2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (8 bits) arrays (rank 1) are equal.
Check if two integer (8 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int8), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (16 bits) arrays (rank 1) are equal.
Check if two integer (16 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int16), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (32 bits) arrays (rank 1) are equal.
Check if two integer (32 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int32), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two integer (64 bits) arrays (rank 1) are equal.
Check if two integer (64 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in), | dimension(:) | :: | i1 | Value to compare. |
|
integer(kind=int64), | intent(in), | dimension(:) | :: | i2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (32 bits) arrays (rank 1) are equal.
Check if two real (32 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real32), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (64 bits) arrays (rank 1) are equal.
Check if two real (64 bits) arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two logical arrays (rank 1) are equal.
Check if two logical arrays (rank 1) are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
logical, | intent(in), | dimension(:) | :: | l1 | Value to compare. |
|
logical, | intent(in), | dimension(:) | :: | l2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a number (integer or real) is positive.
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (16 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (64 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (8 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (16 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (32 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (64 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (32 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (64 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (8 bits) is positive.
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (16 bits) is positive.
Check if a integer (16 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (32 bits) is positive.
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (64 bits) is positive.
Check if a integer (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in) | :: | i | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (32 bits) is positive.
Check if a real (32 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (64 bits) is positive.
Check if a real (64 bits) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r | Value to check. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (8 bits) array (rank 1) is positive.
Check if a integer (8 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int8), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (16 bits) array (rank 1) is positive.
Check if a integer (16 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int16), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (32 bits) array (rank 1) is positive.
Check if a integer (32 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int32), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a integer (64 bits) array (rank 1) is positive.
Check if a integer (64 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
integer(kind=int64), | intent(in), | dimension(:) | :: | i | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (32 bits) array (rank 1) is positive.
Check if a real (32 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if a real (64 bits) array (rank 1) is positive.
Check if a real (64 bits) array (rank 1) is positive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r | Value to check. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals are close with respect a tolerance.
Check if two reals (32 bits) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real32), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (64 bits) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real64), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real32), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (32 bits) are close with respect a tolerance.
Check if two reals (32 bits) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real32), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two reals (64 bits) are close with respect a tolerance.
Check if two reals (64 bits) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in) | :: | r1 | Value to compare. |
||
real(kind=real64), | intent(in) | :: | r2 | Value to compare. |
||
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real32), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real32), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this | The tester. |
||
real(kind=real64), | intent(in), | dimension(:) | :: | r1 | Value to compare. |
|
real(kind=real64), | intent(in), | dimension(:) | :: | r2 | Value to compare. |
|
logical, | intent(in), | optional | :: | fail | Fail flag. |
type :: tester_t
integer(int32) :: n_errors=0_int32 !< Number of errors.
integer(int32) :: n_tests=0_int32 !< Number of tests.
real(real32) :: tolerance32=2._real32*epsilon(1._real32) !< Real tolerance, 32 bits.
real(real64) :: tolerance64=2._real64*epsilon(1._real64) !< Real tolerance, 64 bits.
contains
procedure :: init !< Initialize the tester.
procedure :: print !< Print tests results.
generic, public :: assert_equal => &
assert_equal_i8, &
assert_equal_i16, &
assert_equal_i32, &
assert_equal_i64, &
assert_equal_r32, &
assert_equal_r64, &
assert_equal_l, &
assert_equal_i8_1, &
assert_equal_i16_1, &
assert_equal_i32_1, &
assert_equal_i64_1, &
assert_equal_r32_1, &
assert_equal_r64_1, &
assert_equal_l_1 !< Check if two values (integer, real or logical) are equal.
procedure, private :: assert_equal_i8 !< Check if two integers (8 bits) are equal.
procedure, private :: assert_equal_i16 !< Check if two integers (16 bits) are equal.
procedure, private :: assert_equal_i32 !< Check if two integers (32 bits) are equal.
procedure, private :: assert_equal_i64 !< Check if two integers (64 bits) are equal.
procedure, private :: assert_equal_r32 !< Check if two reals (32 bits) are equal.
procedure, private :: assert_equal_r64 !< Check if two reals (64 bits) are equal.
procedure, private :: assert_equal_l !< Check if two logicals are equal.
procedure, private :: assert_equal_i8_1 !< Check if two integer (8 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_i16_1 !< Check if two integer (16 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_i32_1 !< Check if two integer (32 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_i64_1 !< Check if two integer (64 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_r32_1 !< Check if two real (32 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_r64_1 !< Check if two real (64 bits) arrays (rank 1) are equal.
procedure, private :: assert_equal_l_1 !< Check if two logical arrays (rank 1) are equal.
generic, public :: assert_positive => &
assert_positive_i8, &
assert_positive_i16, &
assert_positive_i32, &
assert_positive_i64, &
assert_positive_r32, &
assert_positive_r64, &
assert_positive_i8_1, &
assert_positive_i16_1, &
assert_positive_i32_1, &
assert_positive_i64_1, &
assert_positive_r32_1, &
assert_positive_r64_1 !< Check if a number (integer or real) is positive.
procedure, private :: assert_positive_i8 !< Check if a integer (8 bits) is positive.
procedure, private :: assert_positive_i16 !< Check if a integer (16 bits) is positive.
procedure, private :: assert_positive_i32 !< Check if a integer (32 bits) is positive.
procedure, private :: assert_positive_i64 !< Check if a integer (64 bits) is positive.
procedure, private :: assert_positive_r32 !< Check if a real (32 bits) is positive.
procedure, private :: assert_positive_r64 !< Check if a real (64 bits) is positive.
procedure, private :: assert_positive_i8_1 !< Check if a integer (8 bits) array (rank 1) is positive.
procedure, private :: assert_positive_i16_1 !< Check if a integer (16 bits) array (rank 1) is positive.
procedure, private :: assert_positive_i32_1 !< Check if a integer (32 bits) array (rank 1) is positive.
procedure, private :: assert_positive_i64_1 !< Check if a integer (64 bits) array (rank 1) is positive.
procedure, private :: assert_positive_r32_1 !< Check if a real (32 bits) array (rank 1) is positive.
procedure, private :: assert_positive_r64_1 !< Check if a real (64 bits) array (rank 1) is positive.
generic, public :: assert_close => &
assert_close_r32, &
assert_close_r64, &
assert_close_r32_1, &
assert_close_r64_1 !< Check if two reals are close with respect a tolerance.
procedure, private :: assert_close_r32 !< Check if two reals (32 bits) are close with respect a tolerance.
procedure, private :: assert_close_r64 !< Check if two reals (64 bits) are close with respect a tolerance.
procedure, private :: assert_close_r32_1 !< Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
procedure, private :: assert_close_r64_1 !< Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
end type tester_t