test_parse_terminate Subroutine

public subroutine test_parse_terminate()

Arguments

None

Calls

proc~~test_parse_terminate~~CallsGraph proc~test_parse_terminate test_parse_terminate asserttrue asserttrue proc~test_parse_terminate->asserttrue none~decode ProtocolParser%decode proc~test_parse_terminate->none~decode none~encode ProtocolParser%encode proc~test_parse_terminate->none~encode deserialize deserialize none~decode->deserialize none~at~342 IntegerMessageMap%at none~decode->none~at~342 get_length get_length none~encode->get_length get_type_id get_type_id none~encode->get_type_id serialize serialize none~encode->serialize none~find~96 IntegerMessageMap%find none~at~342->none~find~96

Source Code

   subroutine test_parse_terminate()
      type (ProtocolParser) :: parser
      type (TerminateMessage) :: expected_message

      integer, allocatable :: buffer(:)
      class (AbstractMessage), allocatable :: found_message

      parser = ProtocolParser()
      
      buffer = parser%encode(expected_message)
      call parser%decode(buffer, found_message)

      @assertTrue(same_type_as(expected_message, found_message))
      
   end subroutine test_parse_terminate