test_copy_shared_field Subroutine

public subroutine test_copy_shared_field()

Arguments

None

Calls

proc~~test_copy_shared_field~~CallsGraph proc~test_copy_shared_field test_copy_shared_field anyexceptions anyexceptions proc~test_copy_shared_field->anyexceptions assert_that assert_that proc~test_copy_shared_field->assert_that esmf_fieldemptycreate esmf_fieldemptycreate proc~test_copy_shared_field->esmf_fieldemptycreate interface~mapl_fieldinfocopyshared MAPL_FieldInfoCopyShared proc~test_copy_shared_field->interface~mapl_fieldinfocopyshared interface~mapl_fieldinfogetshared MAPL_FieldInfoGetShared proc~test_copy_shared_field->interface~mapl_fieldinfogetshared interface~mapl_fieldinfosetshared MAPL_FieldInfoSetShared proc~test_copy_shared_field->interface~mapl_fieldinfosetshared sourcelocation sourcelocation proc~test_copy_shared_field->sourcelocation

Source Code

   subroutine test_copy_shared_field()
      type(ESMF_Field) :: f_in, f_out
      integer :: status
      integer :: ia, ib

      f_in = ESMF_FieldEmptyCreate(name='f_in', _RC)
      f_out= ESMF_FieldEmptyCreate(name='f_out', _RC)

      call MAPL_FieldInfoSetShared(f_in, key='a', value=1, _RC)
      call MAPL_FieldInfoSetShared(f_in, key='b', value=2, _RC)

      call MAPL_FieldInfoCopyShared(f_in, f_out, _RC)

      call MAPL_FieldInfoGetShared(f_out, key='a', value=ia, _RC)
      call MAPL_FieldInfoGetShared(f_out, key='b', value=ib, _RC)

      @assert_that(ia, is(1))
      @assert_that(ib, is(2))

   end subroutine test_copy_shared_field