Routines to test Fortran programs. More...
Data Types | |
type | tester_t |
The main tester class. More... | |
Private Member Functions | |
subroutine | init (this, tolerance32, tolerance64) |
Initialize the tester. More... | |
subroutine | print (this, errorstop) |
Print tests results. More... | |
subroutine | assert_equal_i8 (this, i1, i2) |
Check if two integers (8 bits) are equal. More... | |
subroutine | assert_equal_i16 (this, i1, i2) |
Check if two integers (16 bits) are equal. More... | |
subroutine | assert_equal_i32 (this, i1, i2) |
Check if two integers (32 bits) are equal. More... | |
subroutine | assert_equal_i64 (this, i1, i2) |
Check if two integers (64 bits) are equal. More... | |
subroutine | assert_equal_r32 (this, r1, r2) |
Check if two reals (32 bits) are equal. More... | |
subroutine | assert_equal_r64 (this, r1, r2) |
Check if two reals (64 bits) are equal. More... | |
subroutine | assert_equal_c32 (this, c1, c2) |
Check if two complex numbers (32 bits) are equal. More... | |
subroutine | assert_equal_c64 (this, c1, c2) |
Check if two complex numbers (64 bits) are equal. More... | |
subroutine | assert_equal_l (this, l1, l2) |
Check if two logicals are equal. More... | |
subroutine | assert_equal_i8_1 (this, i1, i2) |
Check if two integer (8 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_i16_1 (this, i1, i2) |
Check if two integer (16 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_i32_1 (this, i1, i2) |
Check if two integer (32 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_i64_1 (this, i1, i2) |
Check if two integer (64 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_r32_1 (this, r1, r2) |
Check if two real (32 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_r64_1 (this, r1, r2) |
Check if two real (64 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_c32_1 (this, c1, c2) |
Check if two complex (32 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_c64_1 (this, c1, c2) |
Check if two complex (64 bits) arrays (rank 1) are equal. More... | |
subroutine | assert_equal_l_1 (this, l1, l2) |
Check if two logical arrays (rank 1) are equal. More... | |
subroutine | assert_positive_i8 (this, i) |
Check if a integer (32 bits) is positive. More... | |
subroutine | assert_positive_i16 (this, i) |
Check if a integer (16 bits) is positive. More... | |
subroutine | assert_positive_i32 (this, i) |
Check if a integer (32 bits) is positive. More... | |
subroutine | assert_positive_i64 (this, i) |
Check if a integer (32 bits) is positive. More... | |
subroutine | assert_positive_r32 (this, r) |
Check if a real (32 bits) is positive. More... | |
subroutine | assert_positive_r64 (this, r) |
Check if a real (64 bits) is positive. More... | |
subroutine | assert_positive_i8_1 (this, i) |
Check if a integer (8 bits) array (rank 1) is positive. More... | |
subroutine | assert_positive_i16_1 (this, i) |
Check if a integer (16 bits) array (rank 1) is positive. More... | |
subroutine | assert_positive_i32_1 (this, i) |
Check if a integer (32 bits) array (rank 1) is positive. More... | |
subroutine | assert_positive_i64_1 (this, i) |
Check if a integer (64 bits) array (rank 1) is positive. More... | |
subroutine | assert_positive_r32_1 (this, r) |
Check if a real (32 bits) array (rank 1) is positive. More... | |
subroutine | assert_positive_r64_1 (this, r) |
Check if a real (64 bits) array (rank 1) is positive. More... | |
subroutine | assert_close_r32 (this, r1, r2) |
Check if two reals (32 bits) are close with respect a tolerance. More... | |
subroutine | assert_close_r64 (this, r1, r2) |
Check if two reals (64 bits) are close with respect a tolerance. More... | |
subroutine | assert_close_r32_1 (this, r1, r2) |
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance. More... | |
subroutine | assert_close_r64_1 (this, r1, r2) |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance. More... | |
subroutine | assert_close_c32 (this, c1, c2) |
Check if two complex numbers (32 bits) are close with respect a tolerance. More... | |
subroutine | assert_close_c64 (this, r1, c2) |
Check if two complex numbers (64 bits) are close with respect a tolerance. More... | |
subroutine | assert_close_c32_1 (this, c1, c2) |
Check if two complex (32 bits) arrays (rank 1) are close with respect a tolerance. More... | |
subroutine | assert_close_c64_1 (this, c1, c2) |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance. More... | |
Routines to test Fortran programs.
fortran_tester is a pure-Fortran module. It provides a datatype to hold test results and routines to test for equality, closeness, and positivity of variables. The routines are overloaded and the resulting interface consists of a small number of names.
Definition at line 11 of file tester.f90.
|
private |
Check if two complex numbers (32 bits) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 657 of file tester.f90.
|
private |
Check if two complex (32 bits) arrays (rank 1) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 685 of file tester.f90.
|
private |
Check if two complex numbers (64 bits) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 671 of file tester.f90.
|
private |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 703 of file tester.f90.
|
private |
Check if two reals (32 bits) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 593 of file tester.f90.
|
private |
Check if two real (32 bits) arrays (rank 1) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 621 of file tester.f90.
|
private |
Check if two reals (64 bits) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 607 of file tester.f90.
|
private |
Check if two real (64 bits) arrays (rank 1) are close with respect a tolerance.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 639 of file tester.f90.
|
private |
Check if two complex numbers (32 bits) are equal.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 237 of file tester.f90.
|
private |
Check if two complex (32 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 384 of file tester.f90.
|
private |
Check if two complex numbers (64 bits) are equal.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 250 of file tester.f90.
|
private |
Check if two complex (64 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | c1 | Value to compare. |
[in] | c2 | Value to compare. |
Definition at line 402 of file tester.f90.
|
private |
Check if two integers (16 bits) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 172 of file tester.f90.
|
private |
Check if two integer (16 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 294 of file tester.f90.
|
private |
Check if two integers (32 bits) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 185 of file tester.f90.
|
private |
Check if two integer (32 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 312 of file tester.f90.
|
private |
Check if two integers (64 bits) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 198 of file tester.f90.
|
private |
Check if two integer (64 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 330 of file tester.f90.
|
private |
Check if two integers (8 bits) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 159 of file tester.f90.
|
private |
Check if two integer (8 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | i1 | Value to compare. |
[in] | i2 | Value to compare. |
Definition at line 276 of file tester.f90.
|
private |
Check if two logicals are equal.
[in,out] | this | The tester. |
[in] | l1 | Value to compare. |
[in] | l2 | Value to compare. |
Definition at line 263 of file tester.f90.
|
private |
Check if two logical arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | l1 | Value to compare. |
[in] | l2 | Value to compare. |
Definition at line 420 of file tester.f90.
|
private |
Check if two reals (32 bits) are equal.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 211 of file tester.f90.
|
private |
Check if two real (32 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 348 of file tester.f90.
|
private |
Check if two reals (64 bits) are equal.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 224 of file tester.f90.
|
private |
Check if two real (64 bits) arrays (rank 1) are equal.
[in,out] | this | The tester. |
[in] | r1 | Value to compare. |
[in] | r2 | Value to compare. |
Definition at line 366 of file tester.f90.
|
private |
Check if a integer (16 bits) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 455 of file tester.f90.
|
private |
Check if a integer (16 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 528 of file tester.f90.
|
private |
Check if a integer (32 bits) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 467 of file tester.f90.
|
private |
Check if a integer (32 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 541 of file tester.f90.
|
private |
Check if a integer (32 bits) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 479 of file tester.f90.
|
private |
Check if a integer (64 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 554 of file tester.f90.
|
private |
Check if a integer (32 bits) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 443 of file tester.f90.
|
private |
Check if a integer (8 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | i | Value to check. |
Definition at line 515 of file tester.f90.
|
private |
Check if a real (32 bits) is positive.
[in,out] | this | The tester. |
[in] | r | Value to check. |
Definition at line 491 of file tester.f90.
|
private |
Check if a real (32 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | r | Value to check. |
Definition at line 567 of file tester.f90.
|
private |
Check if a real (64 bits) is positive.
[in,out] | this | The tester. |
[in] | r | Value to check. |
Definition at line 503 of file tester.f90.
|
private |
Check if a real (64 bits) array (rank 1) is positive.
[in,out] | this | The tester. |
[in] | r | Value to check. |
Definition at line 580 of file tester.f90.
|
private |
Initialize the tester.
[out] | this | The tester. |
[in] | tolerance32 | Real tolerance, 32 bits. |
[in] | tolerance64 | Real tolerance, 64 bits. |
Definition at line 111 of file tester.f90.
|
private |
Print tests results.
[in] | this | The tester. |
[in] | errorstop | Flag to activate error stop if one test fails. |
Definition at line 134 of file tester.f90.