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~170 IntegerMessageMap%at none~decode->none~at~170 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~45 IntegerMessageMap%find none~at~170->none~find~45

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)
      allocate(found_message, source=parser%decode(buffer))

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