test_retrieve_exists Subroutine

public subroutine test_retrieve_exists()

Arguments

None

Calls

proc~~test_retrieve_exists~2~~CallsGraph proc~test_retrieve_exists~2 test_retrieve_exists assertequal assertequal proc~test_retrieve_exists~2->assertequal assertfalse assertfalse proc~test_retrieve_exists~2->assertfalse asserttrue asserttrue proc~test_retrieve_exists~2->asserttrue none~at~288 StringGridFactoryMap%at proc~test_retrieve_exists~2->none~at~288 none~insert~204 StringGridFactoryMap%insert proc~test_retrieve_exists~2->none~insert~204 none~to_string~12 AbstractGridFactory%to_string proc~test_retrieve_exists~2->none~to_string~12 none~find~65 StringGridFactoryMap%find none~at~288->none~find~65 none~insert_pair~20 StringGridFactoryMap%insert_pair none~insert~204->none~insert_pair~20

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