tester_t Derived Type

type, public :: tester_t

Source Code


Components

TypeVisibility AttributesNameInitial
integer, public :: n_errors
integer, public :: n_tests
real, public :: r_tol
double precision, public :: d_tol

Type-Bound Procedures

procedure, public :: init

  • private subroutine init(this, d_tol, r_tol)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(out) :: this
    double precision, intent(in), optional :: d_tol
    real, intent(in), optional :: r_tol

procedure, public :: print

  • private subroutine print(this, errorstop)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(in) :: this
    logical, intent(in), optional :: errorstop
  • private subroutine assert_equal_i(this, i1, i2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in) :: i1
    integer, intent(in) :: i2
    logical, intent(in), optional :: fail
  • private subroutine assert_equal_l(this, l1, l2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    logical, intent(in) :: l1
    logical, intent(in) :: l2
    logical, intent(in), optional :: fail
  • private subroutine assert_equal_i_1(this, i1, i2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in), dimension(:):: i1
    integer, intent(in), dimension(:):: i2
    logical, intent(in), optional :: fail
  • private subroutine assert_equal_l_1(this, l1, l2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    logical, intent(in), dimension(:):: l1
    logical, intent(in), dimension(:):: l2
    logical, intent(in), optional :: fail
  • private subroutine assert_equal_d(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d1
    double precision, intent(in) :: d2
    logical, intent(in), optional :: fail

procedure, private :: assert_equal_i

  • private subroutine assert_equal_i(this, i1, i2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in) :: i1
    integer, intent(in) :: i2
    logical, intent(in), optional :: fail

procedure, private :: assert_equal_l

  • private subroutine assert_equal_l(this, l1, l2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    logical, intent(in) :: l1
    logical, intent(in) :: l2
    logical, intent(in), optional :: fail

procedure, private :: assert_equal_i_1

  • private subroutine assert_equal_i_1(this, i1, i2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in), dimension(:):: i1
    integer, intent(in), dimension(:):: i2
    logical, intent(in), optional :: fail

procedure, private :: assert_equal_l_1

  • private subroutine assert_equal_l_1(this, l1, l2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    logical, intent(in), dimension(:):: l1
    logical, intent(in), dimension(:):: l2
    logical, intent(in), optional :: fail

procedure, private :: assert_equal_d

  • private subroutine assert_equal_d(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d1
    double precision, intent(in) :: d2
    logical, intent(in), optional :: fail

generic, public :: assert_positive => assert_positive_i, assert_positive_i_1, assert_positive_d

  • private subroutine assert_positive_i(this, i, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in) :: i
    logical, intent(in), optional :: fail
  • private subroutine assert_positive_i_1(this, i, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in), dimension(:):: i
    logical, intent(in), optional :: fail
  • private subroutine assert_positive_d(this, d, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d
    logical, intent(in), optional :: fail

procedure, private :: assert_positive_i

  • private subroutine assert_positive_i(this, i, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in) :: i
    logical, intent(in), optional :: fail

procedure, private :: assert_positive_i_1

  • private subroutine assert_positive_i_1(this, i, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    integer, intent(in), dimension(:):: i
    logical, intent(in), optional :: fail

procedure, private :: assert_positive_d

  • private subroutine assert_positive_d(this, d, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d
    logical, intent(in), optional :: fail

generic, public :: assert_close => assert_close_d, assert_close_r, assert_close_d_1

  • private subroutine assert_close_d(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d1
    double precision, intent(in) :: d2
    logical, intent(in), optional :: fail
  • private subroutine assert_close_r(this, r1, r2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    real, intent(in) :: r1
    real, intent(in) :: r2
    logical, intent(in), optional :: fail
  • private subroutine assert_close_d_1(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in), dimension(:):: d1
    double precision, intent(in), dimension(:):: d2
    logical, intent(in), optional :: fail

procedure, private :: assert_close_d

  • private subroutine assert_close_d(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in) :: d1
    double precision, intent(in) :: d2
    logical, intent(in), optional :: fail

procedure, private :: assert_close_r

  • private subroutine assert_close_r(this, r1, r2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    real, intent(in) :: r1
    real, intent(in) :: r2
    logical, intent(in), optional :: fail

procedure, private :: assert_close_d_1

  • private subroutine assert_close_d_1(this, d1, d2, fail)

    Arguments

    Type IntentOptional AttributesName
    class(tester_t), intent(inout) :: this
    double precision, intent(in), dimension(:):: d1
    double precision, intent(in), dimension(:):: d2
    logical, intent(in), optional :: fail

Source Code

  type tester_t
     integer :: n_errors
     integer :: n_tests
     real :: r_tol
     double precision :: d_tol
   contains
     procedure :: init
     procedure :: print
     generic, public :: assert_equal => assert_equal_i, assert_equal_l, assert_equal_i_1, &
          assert_equal_l_1, assert_equal_d
     procedure, private :: assert_equal_i
     procedure, private :: assert_equal_l
     procedure, private :: assert_equal_i_1
     procedure, private :: assert_equal_l_1
     procedure, private :: assert_equal_d
     generic, public :: assert_positive => assert_positive_i, assert_positive_i_1, assert_positive_d
     procedure, private :: assert_positive_i
     procedure, private :: assert_positive_i_1
     procedure, private :: assert_positive_d
     generic, public :: assert_close => assert_close_d, assert_close_r, assert_close_d_1
     procedure, private :: assert_close_d
     procedure, private :: assert_close_r
     procedure, private :: assert_close_d_1
  end type tester_t