test_set_stateitem_private_r4 Subroutine

public subroutine test_set_stateitem_private_r4()

Arguments

None

Calls

proc~~test_set_stateitem_private_r4~~CallsGraph proc~test_set_stateitem_private_r4 test_set_stateitem_private_r4 anyexceptions anyexceptions proc~test_set_stateitem_private_r4->anyexceptions assert_that assert_that proc~test_set_stateitem_private_r4->assert_that esmf_fielddestroy esmf_fielddestroy proc~test_set_stateitem_private_r4->esmf_fielddestroy esmf_fieldemptycreate esmf_fieldemptycreate proc~test_set_stateitem_private_r4->esmf_fieldemptycreate esmf_stateadd esmf_stateadd proc~test_set_stateitem_private_r4->esmf_stateadd esmf_statecreate esmf_statecreate proc~test_set_stateitem_private_r4->esmf_statecreate esmf_statedestroy esmf_statedestroy proc~test_set_stateitem_private_r4->esmf_statedestroy interface~mapl_infogetprivate MAPL_InfoGetPrivate proc~test_set_stateitem_private_r4->interface~mapl_infogetprivate interface~mapl_infosetnamespace MAPL_InfoSetNamespace proc~test_set_stateitem_private_r4->interface~mapl_infosetnamespace interface~mapl_infosetprivate MAPL_InfoSetPrivate proc~test_set_stateitem_private_r4->interface~mapl_infosetprivate sourcelocation sourcelocation proc~test_set_stateitem_private_r4->sourcelocation

Source Code

   subroutine test_set_stateitem_private_r4()
      type(ESMF_State) :: state
      type(ESMF_Field) :: field
      integer :: status
      real(kind=ESMF_KIND_R4) :: r
      real(kind=ESMF_KIND_R4), parameter :: expected = 1.0

      state = ESMF_StateCreate(name='import', _RC)
      call MAPL_InfoSetNameSpace(state, namespace='/compA', _RC)

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

      call MAPL_InfoSetPrivate(state, short_name='f', key='a', value=expected, _RC)
      call MAPL_InfoGetPrivate(state, short_name='f', key='a', value=r, _RC)

      @assert_that(r, is(expected))

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

   end subroutine test_set_stateitem_private_r4