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~56 StringGridFactoryMap%at proc~test_retrieve_exists~2->none~at~56 none~insert~34 StringGridFactoryMap%insert proc~test_retrieve_exists~2->none~insert~34 none~to_string~8 AbstractGridFactory%to_string proc~test_retrieve_exists~2->none~to_string~8 none~find~13 StringGridFactoryMap%find none~at~56->none~find~13 none~insert_pair~4 StringGridFactoryMap%insert_pair none~insert~34->none~insert_pair~4

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