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~244 StringGridFactoryMap%at proc~test_retrieve_exists->none~at~244 none~insert~169 StringGridFactoryMap%insert proc~test_retrieve_exists->none~insert~169 none~to_string~8 AbstractGridFactory%to_string proc~test_retrieve_exists->none~to_string~8 none~find~54 StringGridFactoryMap%find none~at~244->none~find~54 none~insert_pair~16 StringGridFactoryMap%insert_pair none~insert~169->none~insert_pair~16

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