test_get_subregistry Subroutine

public subroutine test_get_subregistry()

Arguments

None

Calls

proc~~test_get_subregistry~~CallsGraph proc~test_get_subregistry test_get_subregistry assert_that assert_that proc~test_get_subregistry->assert_that none~add_subregistry StateRegistry%add_subregistry proc~test_get_subregistry->none~add_subregistry none~get_subregistry~2 StateRegistry%get_subregistry proc~test_get_subregistry->none~get_subregistry~2 true true proc~test_get_subregistry->true interface~mapl_assert MAPL_Assert none~add_subregistry->interface~mapl_assert none~get_name~14 StateRegistry%get_name none~add_subregistry->none~get_name~14 none~has_subregistry StateRegistry%has_subregistry none~add_subregistry->none~has_subregistry none~insert~88 RegistryPtrMap%insert none~add_subregistry->none~insert~88 proc~mapl_return MAPL_Return none~add_subregistry->proc~mapl_return none~get_subregistry_by_conn_pt StateRegistry%get_subregistry_by_conn_pt none~get_subregistry~2->none~get_subregistry_by_conn_pt none~get_subregistry_by_conn_pt->none~get_subregistry~2 none~get_subregistry_by_conn_pt->proc~mapl_return proc~mapl_verify MAPL_Verify none~get_subregistry_by_conn_pt->proc~mapl_verify none~insert_pair~9 RegistryPtrMap%insert_pair none~insert~88->none~insert_pair~9 at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_get_subregistry()
      type(StateRegistry), target :: child_registry
      type(StateRegistry), target :: r
      class(StateRegistry), pointer :: ptr
      
      r = StateRegistry('parent')
      child_registry = StateRegistry('child')
      call r%add_subregistry(child_registry)

      ptr => r%get_subregistry('child')
      @assert_that(associated(ptr), is(true()))

   end subroutine test_get_subregistry