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~144 StringGridFactoryMap%at proc~test_retrieve_exists~2->none~at~144 none~insert~94 StringGridFactoryMap%insert proc~test_retrieve_exists~2->none~insert~94 none~to_string~2 AbstractGridFactory%to_string proc~test_retrieve_exists~2->none~to_string~2 none~find~27 StringGridFactoryMap%find none~at~144->none~find~27 none~insert_pair~8 StringGridFactoryMap%insert_pair none~insert~94->none~insert_pair~8

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