Test_ProtocolParser.pf Source File


This file depends on

sourcefile~~test_protocolparser.pf~~EfferentGraph sourcefile~test_protocolparser.pf Test_ProtocolParser.pf sourcefile~abstractmessage.f90 AbstractMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~abstractmessage.f90 sourcefile~addextcollectionmessage.f90 AddExtCollectionMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~addextcollectionmessage.f90 sourcefile~donemessage.f90 DoneMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~donemessage.f90 sourcefile~idmessage.f90 IDMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~idmessage.f90 sourcefile~prefetchdatamessage.f90 PrefetchDataMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~prefetchdatamessage.f90 sourcefile~protocolparser.f90 ProtocolParser.F90 sourcefile~test_protocolparser.pf->sourcefile~protocolparser.f90 sourcefile~terminatemessage.f90 TerminateMessage.F90 sourcefile~test_protocolparser.pf->sourcefile~terminatemessage.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~abstractmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~addextcollectionmessage.f90->sourcefile~abstractmessage.f90 sourcefile~addextcollectionmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfio_utilities.f90 pFIO_Utilities.F90 sourcefile~addextcollectionmessage.f90->sourcefile~pfio_utilities.f90 sourcefile~donemessage.f90->sourcefile~abstractmessage.f90 sourcefile~donemessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~idmessage.f90->sourcefile~abstractmessage.f90 sourcefile~idmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractmessage.f90 sourcefile~abstractdatamessage.f90 AbstractDataMessage.F90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractdatamessage.f90 sourcefile~abstractdatareference.f90 AbstractDataReference.F90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractdatareference.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~prefetchdatamessage.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~prefetchdatamessage.f90->sourcefile~pfio_utilities.f90 sourcefile~protocolparser.f90->sourcefile~abstractmessage.f90 sourcefile~protocolparser.f90->sourcefile~addextcollectionmessage.f90 sourcefile~protocolparser.f90->sourcefile~donemessage.f90 sourcefile~protocolparser.f90->sourcefile~idmessage.f90 sourcefile~protocolparser.f90->sourcefile~prefetchdatamessage.f90 sourcefile~protocolparser.f90->sourcefile~terminatemessage.f90 sourcefile~addhistcollectionmessage.f90 AddHistCollectionMessage.F90 sourcefile~protocolparser.f90->sourcefile~addhistcollectionmessage.f90 sourcefile~collectiveprefetchdatamessage.f90 CollectivePrefetchDataMessage.F90 sourcefile~protocolparser.f90->sourcefile~collectiveprefetchdatamessage.f90 sourcefile~collectiveprefetchdonemessage.f90 CollectivePrefetchDoneMessage.F90 sourcefile~protocolparser.f90->sourcefile~collectiveprefetchdonemessage.f90 sourcefile~collectivestagedatamessage.f90 CollectiveStageDataMessage.F90 sourcefile~protocolparser.f90->sourcefile~collectivestagedatamessage.f90 sourcefile~collectivestagedonemessage.f90 CollectiveStageDoneMessage.F90 sourcefile~protocolparser.f90->sourcefile~collectivestagedonemessage.f90 sourcefile~dummymessage.f90 DummyMessage.F90 sourcefile~protocolparser.f90->sourcefile~dummymessage.f90 sourcefile~filemetadata.f90 FileMetadata.F90 sourcefile~protocolparser.f90->sourcefile~filemetadata.f90 sourcefile~forwarddatamessage.f90 ForwardDataMessage.F90 sourcefile~protocolparser.f90->sourcefile~forwarddatamessage.f90 sourcefile~handshakemessage.f90 HandShakeMessage.F90 sourcefile~protocolparser.f90->sourcefile~handshakemessage.f90 sourcefile~integermessagemap.f90 IntegerMessageMap.F90 sourcefile~protocolparser.f90->sourcefile~integermessagemap.f90 sourcefile~modifymetadatamessage.f90 ModifyMetadataMessage.F90 sourcefile~protocolparser.f90->sourcefile~modifymetadatamessage.f90 sourcefile~prefetchdonemessage.f90 PrefetchDoneMessage.F90 sourcefile~protocolparser.f90->sourcefile~prefetchdonemessage.f90 sourcefile~replacemetadatamessage.f90 ReplaceMetadataMessage.F90 sourcefile~protocolparser.f90->sourcefile~replacemetadatamessage.f90 sourcefile~stagedatamessage.f90 StageDataMessage.F90 sourcefile~protocolparser.f90->sourcefile~stagedatamessage.f90 sourcefile~stagedonemessage.f90 StageDoneMessage.F90 sourcefile~protocolparser.f90->sourcefile~stagedonemessage.f90 sourcefile~terminatemessage.f90->sourcefile~abstractmessage.f90 sourcefile~terminatemessage.f90->sourcefile~mapl_exceptionhandling.f90

Source Code

module test_ProtocolParser
   use pfunit
   use pFIO_ProtocolParserMod
   use pFIO_AbstractMessageMod

   use pFIO_TerminateMessageMod
   use pFIO_DoneMessageMod
   use pFIO_AddExtCollectionMessageMod
   use pFIO_IdMessageMod
   use pFIO_PrefetchDataMessageMod

contains

   @test
   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

end module test_ProtocolParser