test_tester_1 Program

Uses

  • program~~test_tester_1~2~~UsesGraph program~test_tester_1~2 test_tester_1 module~tester tester program~test_tester_1~2->module~tester iso_fortran_env iso_fortran_env module~tester->iso_fortran_env

Calls

program~~test_tester_1~2~~CallsGraph program~test_tester_1~2 test_tester_1 none~assert_close tester::tester_t%assert_close program~test_tester_1~2->none~assert_close none~assert_equal tester::tester_t%assert_equal program~test_tester_1~2->none~assert_equal proc~init~2 tester::tester_t%init program~test_tester_1~2->proc~init~2 proc~assert_close_c32 tester::tester_t%assert_close_c32 none~assert_close->proc~assert_close_c32 proc~assert_close_c32_1 tester::tester_t%assert_close_c32_1 none~assert_close->proc~assert_close_c32_1 proc~assert_close_c64 tester::tester_t%assert_close_c64 none~assert_close->proc~assert_close_c64 proc~assert_close_c64_1 tester::tester_t%assert_close_c64_1 none~assert_close->proc~assert_close_c64_1 proc~assert_close_r32 tester::tester_t%assert_close_r32 none~assert_close->proc~assert_close_r32 proc~assert_close_r32_1 tester::tester_t%assert_close_r32_1 none~assert_close->proc~assert_close_r32_1 proc~assert_close_r64 tester::tester_t%assert_close_r64 none~assert_close->proc~assert_close_r64 proc~assert_close_r64_1 tester::tester_t%assert_close_r64_1 none~assert_close->proc~assert_close_r64_1 proc~assert_equal_c32 tester::tester_t%assert_equal_c32 none~assert_equal->proc~assert_equal_c32 proc~assert_equal_c32_1 tester::tester_t%assert_equal_c32_1 none~assert_equal->proc~assert_equal_c32_1 proc~assert_equal_c64 tester::tester_t%assert_equal_c64 none~assert_equal->proc~assert_equal_c64 proc~assert_equal_c64_1 tester::tester_t%assert_equal_c64_1 none~assert_equal->proc~assert_equal_c64_1 proc~assert_equal_i16 tester::tester_t%assert_equal_i16 none~assert_equal->proc~assert_equal_i16 proc~assert_equal_i16_1 tester::tester_t%assert_equal_i16_1 none~assert_equal->proc~assert_equal_i16_1 proc~assert_equal_i32 tester::tester_t%assert_equal_i32 none~assert_equal->proc~assert_equal_i32 proc~assert_equal_i32_1 tester::tester_t%assert_equal_i32_1 none~assert_equal->proc~assert_equal_i32_1 proc~assert_equal_i64 tester::tester_t%assert_equal_i64 none~assert_equal->proc~assert_equal_i64 proc~assert_equal_i64_1 tester::tester_t%assert_equal_i64_1 none~assert_equal->proc~assert_equal_i64_1 proc~assert_equal_i8 tester::tester_t%assert_equal_i8 none~assert_equal->proc~assert_equal_i8 proc~assert_equal_i8_1 tester::tester_t%assert_equal_i8_1 none~assert_equal->proc~assert_equal_i8_1 proc~assert_equal_l tester::tester_t%assert_equal_l none~assert_equal->proc~assert_equal_l proc~assert_equal_l_1 tester::tester_t%assert_equal_l_1 none~assert_equal->proc~assert_equal_l_1 proc~assert_equal_r32 tester::tester_t%assert_equal_r32 none~assert_equal->proc~assert_equal_r32 proc~assert_equal_r32_1 tester::tester_t%assert_equal_r32_1 none~assert_equal->proc~assert_equal_r32_1 proc~assert_equal_r64 tester::tester_t%assert_equal_r64 none~assert_equal->proc~assert_equal_r64 proc~assert_equal_r64_1 tester::tester_t%assert_equal_r64_1 none~assert_equal->proc~assert_equal_r64_1

Variables

Type Attributes Name Initial
integer, parameter :: rk = selected_real_kind(15)
complex(kind=rk) :: x
complex(kind=rk) :: y
complex(kind=rk) :: a(5)
complex(kind=rk) :: b(5)
complex :: c(3)
complex :: d(3)
type(tester_t) :: test

Source Code

program test_tester_1
  use tester
  implicit none

  integer, parameter :: rk = selected_real_kind(15)
  complex(kind=rk) :: x, y
  complex(kind=rk) :: a(5), b(5)
  complex :: c(3), d(3)
  type(tester_t) :: test

  call test% init()

  call test% assert_equal((1234, -1234), (1234, -1234))

  call test% assert_close((1._rk, 0._rk), (1._rk, 0._rk))

  call test% assert_close(cmplx(1., epsilon(0.)), (1., 0.))

  x = (0._rk, 1._rk)
  y = cmplx(epsilon(0._rk), 1._rk, kind=rk)
  call test% assert_close(x, y)

  x = cmplx(-1158.1181871905803291, 779.0494065373754893)
  y = cmplx(-1158.1181871905803291, 779.0494065373754893)

  call test% assert_equal(x, y)

  c = 1
  d = 1
  d = d + cmplx(0, epsilon(0.))

  call test% assert_close(c, d)

  c = cmplx(1154274.4026509234681726, -461087.8365501734078862)
  d = cmplx(1154274.4026509234681726, -461087.8365501734078862)

  call test% assert_equal(c, d)

  a = -10
  b = -10

  call test% assert_equal(a, b)

  a = 0
  b = epsilon(0._rk)

  call test% assert_close(a, b)

  b(1) = b(1) + cmplx(0._rk, epsilon(real(b(1))), kind=rk)

  call test% assert_close(a, b)

  call test% print()

end program test_tester_1