Test_PrefetchDataMessage.pf Source File


This file depends on

sourcefile~~test_prefetchdatamessage.pf~~EfferentGraph sourcefile~test_prefetchdatamessage.pf Test_PrefetchDataMessage.pf sourcefile~arrayreference.f90 ArrayReference.F90 sourcefile~test_prefetchdatamessage.pf->sourcefile~arrayreference.f90 sourcefile~prefetchdatamessage.f90 PrefetchDataMessage.F90 sourcefile~test_prefetchdatamessage.pf->sourcefile~prefetchdatamessage.f90 sourcefile~abstractdatareference.f90 AbstractDataReference.F90 sourcefile~arrayreference.f90->sourcefile~abstractdatareference.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~arrayreference.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfio_constants.f90 pFIO_Constants.F90 sourcefile~arrayreference.f90->sourcefile~pfio_constants.f90 sourcefile~abstractdatamessage.f90 AbstractDataMessage.F90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractdatamessage.f90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractdatareference.f90 sourcefile~abstractmessage.f90 AbstractMessage.F90 sourcefile~prefetchdatamessage.f90->sourcefile~abstractmessage.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~prefetchdatamessage.f90->sourcefile~keywordenforcer.f90 sourcefile~pfio_utilities.f90 pFIO_Utilities.F90 sourcefile~prefetchdatamessage.f90->sourcefile~pfio_utilities.f90 sourcefile~abstractdatamessage.f90->sourcefile~abstractdatareference.f90 sourcefile~abstractdatamessage.f90->sourcefile~abstractmessage.f90 sourcefile~abstractdatamessage.f90->sourcefile~keywordenforcer.f90 sourcefile~abstractdatamessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~abstractdatamessage.f90->sourcefile~pfio_utilities.f90 sourcefile~abstractdatareference.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~abstractdatareference.f90->sourcefile~pfio_constants.f90 sourcefile~abstractdatareference.f90->sourcefile~pfio_utilities.f90 sourcefile~abstractmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90 sourcefile~pfio_utilities.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfio_utilities.f90->sourcefile~pfio_constants.f90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90

Source Code

module test_PrefetchDataMessage
   use pfunit
   use pFIO_PrefetchDataMessageMod
   use pFIO_ArrayReferenceMod
   implicit none

contains

   @test
   subroutine test_serialize_1d()
      type (PrefetchDataMessage) :: msg_in, msg_out
      type (ArrayReference) :: ref

      integer, target :: n(3)
      integer, allocatable :: buffer(:)

      ref = ArrayReference(n)

      msg_in = PrefetchDataMessage(1, 3, 'foo', 'bar', ref, start=[2])
      allocate(buffer(msg_in%get_length()))
      call msg_in%serialize(buffer)
      call msg_out%deserialize(buffer)

      @assertEqual(1, msg_out%request_id)
      @assertEqual(3, msg_out%collection_id)
      @assertEqual('foo', msg_out%file_name)
      @assertEqual('bar', msg_out%var_name)
      @assertEqual([2], msg_out%start)

      
      
   end subroutine test_serialize_1d



end module test_PrefetchDataMessage