test_set_stateitem_shared_logical Subroutine

public subroutine test_set_stateitem_shared_logical()

Arguments

None

Calls

proc~~test_set_stateitem_shared_logical~~CallsGraph proc~test_set_stateitem_shared_logical test_set_stateitem_shared_logical anyexceptions anyexceptions proc~test_set_stateitem_shared_logical->anyexceptions assert_that assert_that proc~test_set_stateitem_shared_logical->assert_that esmf_fielddestroy esmf_fielddestroy proc~test_set_stateitem_shared_logical->esmf_fielddestroy esmf_fieldemptycreate esmf_fieldemptycreate proc~test_set_stateitem_shared_logical->esmf_fieldemptycreate esmf_stateadd esmf_stateadd proc~test_set_stateitem_shared_logical->esmf_stateadd esmf_statecreate esmf_statecreate proc~test_set_stateitem_shared_logical->esmf_statecreate esmf_statedestroy esmf_statedestroy proc~test_set_stateitem_shared_logical->esmf_statedestroy interface~mapl_infogetshared MAPL_InfoGetShared proc~test_set_stateitem_shared_logical->interface~mapl_infogetshared interface~mapl_infosetshared MAPL_InfoSetShared proc~test_set_stateitem_shared_logical->interface~mapl_infosetshared sourcelocation sourcelocation proc~test_set_stateitem_shared_logical->sourcelocation true true proc~test_set_stateitem_shared_logical->true

Source Code

   subroutine test_set_stateitem_shared_logical()
      type(ESMF_State) :: state
      type(ESMF_Field) :: field
      integer :: status
      logical :: l
      logical, parameter :: expected = .true.

      state = ESMF_StateCreate(name='export', _RC)

      field = ESMF_FieldEmptyCreate(name='f', _RC)
      call ESMF_StateAdd(state, [field], _RC)

      call MAPL_InfoSetShared(state, short_name='f', key='a', value=expected, _RC)
      l = .false.
      call MAPL_InfoGetShared(state, short_name='f', key='a', value=l, _RC)

      @assert_that(l, is(true()))

      call ESMF_FieldDestroy(field, _RC)
      call ESMF_StateDestroy(state, _RC)

   end subroutine test_set_stateitem_shared_logical