test_retrieve_exists Subroutine

public subroutine test_retrieve_exists()

Arguments

None

Calls

proc~~test_retrieve_exists~~CallsGraph proc~test_retrieve_exists test_retrieve_exists assertequal assertequal proc~test_retrieve_exists->assertequal assertfalse assertfalse proc~test_retrieve_exists->assertfalse asserttrue asserttrue proc~test_retrieve_exists->asserttrue none~at~348 StringGridFactoryMap%at proc~test_retrieve_exists->none~at~348 none~insert~336 StringGridFactoryMap%insert proc~test_retrieve_exists->none~insert~336 none~to_string~6 AbstractGridFactory%to_string proc~test_retrieve_exists->none~to_string~6 none~find~91 StringGridFactoryMap%find none~at~348->none~find~91 none~insert_pair~28 StringGridFactoryMap%insert_pair none~insert~336->none~insert_pair~28

Source Code

   subroutine test_retrieve_exists()
      class (AbstractGridFactory), pointer :: factory
      type (StringGridFactoryMap) :: registry

      @assertFalse(associated(registry%at('a')))
      
      call registry%insert('a', MockGridFactory('A'))
      @assertTrue(associated(registry%at('a')))

      factory => registry%at('a')
      @assertEqual('A', factory%to_string())

   end subroutine test_retrieve_exists