Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(MpiTestMethod), | intent(inout) | :: | this |
subroutine test_parent_user_items_created(this) class(MpiTestMethod), intent(inout) :: this integer :: status type(ESMF_GridComp) :: outer_gc type(OuterMetaComponent), pointer :: outer_meta type(MultiState) :: states type(ESMF_Field) :: f call setup(outer_gc, states, status) @assert_that(status, is(0)) outer_meta => get_outer_meta(outer_gc, rc=status) @assert_that(status, is(0)) @assert_that(check(outer_meta, 'import', expected_count=0), is(0)) @assert_that(check(outer_meta, 'export', expected_count=0), is(0)) @assert_that(check(outer_meta, 'internal', expected_count=0), is(0)) contains integer function check(meta, state_intent, expected_count) result(status) type(OuterMetaComponent), intent(in) :: meta character(*), intent(in) :: state_intent integer, intent(in) :: expected_count type(MultiState) :: states type(ESMF_State) :: state integer :: itemCount type(GriddedComponentDriver), pointer :: user_component status = -1 user_component => outer_meta%get_user_gc_driver() states = user_component%get_states() call states%get_state(state, 'import', rc=status) if (status /= 0) then status = -2 return end if call ESMF_StateGet(state, itemCount=itemCount, rc=status) if (status /= 0) then status = -3 return end if if (itemCount /= expected_count) then status = -4 return end if status = 0 end function check end subroutine test_parent_user_items_created