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~42 StringGridFactoryMap%at proc~test_retrieve_exists~2->none~at~42 none~insert~22 StringGridFactoryMap%insert proc~test_retrieve_exists~2->none~insert~22 none~to_string~4 AbstractGridFactory%to_string proc~test_retrieve_exists~2->none~to_string~4 none~find~5 StringGridFactoryMap%find none~at~42->none~find~5 none~insert_pair~2 StringGridFactoryMap%insert_pair none~insert~22->none~insert_pair~2

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