Test_FieldInfo.pf Source File


This file depends on

sourcefile~~test_fieldinfo.pf~~EfferentGraph sourcefile~test_fieldinfo.pf Test_FieldInfo.pf sourcefile~fieldinfo.f90 FieldInfo.F90 sourcefile~test_fieldinfo.pf->sourcefile~fieldinfo.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~fieldinfo.f90->sourcefile~errorhandling.f90 sourcefile~infoutilities.f90 InfoUtilities.F90 sourcefile~fieldinfo.f90->sourcefile~infoutilities.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~fieldinfo.f90->sourcefile~keywordenforcer.f90 sourcefile~mapl_esmf_infokeys.f90 MAPL_ESMF_InfoKeys.F90 sourcefile~fieldinfo.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~ungriddeddims.f90 UngriddedDims.F90 sourcefile~fieldinfo.f90->sourcefile~ungriddeddims.f90 sourcefile~verticalstaggerloc.f90 VerticalStaggerLoc.F90 sourcefile~fieldinfo.f90->sourcefile~verticalstaggerloc.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~infoutilities.f90->sourcefile~errorhandling.f90 sourcefile~infoutilities.f90->sourcefile~keywordenforcer.f90 sourcefile~infoutilities.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~mapl_esmf_infokeys.f90->sourcefile~errorhandling.f90 sourcefile~ungriddeddims.f90->sourcefile~errorhandling.f90 sourcefile~ungriddeddims.f90->sourcefile~infoutilities.f90 sourcefile~ungriddeddims.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~lu_bound.f90 LU_Bound.F90 sourcefile~ungriddeddims.f90->sourcefile~lu_bound.f90 sourcefile~ungriddeddim.f90 UngriddedDim.F90 sourcefile~ungriddeddims.f90->sourcefile~ungriddeddim.f90 sourcefile~ungriddeddimvector.f90 UngriddedDimVector.F90 sourcefile~ungriddeddims.f90->sourcefile~ungriddeddimvector.f90 sourcefile~ungriddeddim.f90->sourcefile~errorhandling.f90 sourcefile~ungriddeddim.f90->sourcefile~infoutilities.f90 sourcefile~ungriddeddim.f90->sourcefile~lu_bound.f90 sourcefile~ungriddeddimvector.f90->sourcefile~ungriddeddim.f90

Source Code

#include "MAPL_TestErr.h"

module Test_FieldInfo
   use pfunit
   use mapl3g_FieldInfo
   use esmf
   implicit none(type,external)

contains

   @test
   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

end module Test_FieldInfo