test_get_logical_seq Subroutine

public subroutine test_get_logical_seq()

Arguments

None

Calls

proc~~test_get_logical_seq~~CallsGraph proc~test_get_logical_seq test_get_logical_seq ESMF_HConfigAdd ESMF_HConfigAdd proc~test_get_logical_seq->ESMF_HConfigAdd assertequal assertequal proc~test_get_logical_seq->assertequal asserttrue asserttrue proc~test_get_logical_seq->asserttrue interface~get_value get_value proc~test_get_logical_seq->interface~get_value

Source Code

   subroutine test_get_logical_seq()
      character(len=*), parameter :: LABEL = 'tuffet'
      logical, parameter :: EXPECTED(4) = [.TRUE., .FALSE., .FALSE., .TRUE.]
      logical, allocatable :: actual(:)
      type(HConfigParams) :: params
      logical :: found
      integer :: status

      call ESMF_HConfigAdd(hconfig, EXPECTED, addKeyString=LABEL, rc=status)
      @assertEqual(0, status, ERROR_ADD_FAIL)
      params = HConfigParams(hconfig, LABEL, check_value_set=.TRUE.)
      call get_value(params, actual, rc=status)
      found = params%value_set
      @assertEqual(0, status, ERROR_GET_FAILED)
      @assertTrue(found, ERROR_NOT_FOUND // LABEL)
      @assertTrue(all(actual .eqv. EXPECTED), ERROR_MISMATCH)

   end subroutine test_get_logical_seq