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

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