test_almost_equal_array Subroutine

public subroutine test_almost_equal_array(this)

Arguments

Type IntentOptional Attributes Name
class(MpiTestMethod), intent(inout) :: this

Calls

proc~~test_almost_equal_array~~CallsGraph proc~test_almost_equal_array test_almost_equal_array asserttrue asserttrue proc~test_almost_equal_array->asserttrue proc~are_almost_equal are_almost_equal proc~test_almost_equal_array->proc~are_almost_equal

Source Code

   subroutine test_almost_equal_array(this)
      class(MpiTestMethod), intent(inout) :: this
      integer, parameter :: N = 3
      character(len=*), parameter :: MSG = 'Difference exceeds threshold'
      real(kind=ESMF_KIND_R8), parameter :: DENOMS(N) = [3.0, 5.0, 7.0]
      real(kind=ESMF_KIND_R8), parameter :: X(N) = 1.0 / DENOMS
      real(kind=ESMF_KIND_R4) :: y(N)

      y = X

      @assertTrue(all(are_almost_equal(x, y)), trim(MSG))

   end subroutine test_almost_equal_array