test_serialize Subroutine

public subroutine test_serialize()

Arguments

None

Calls

proc~~test_serialize~~CallsGraph proc~test_serialize test_serialize asserttrue asserttrue proc~test_serialize->asserttrue none~deserialize~5 LocalMemReference%deserialize proc~test_serialize->none~deserialize~5 none~serialize~5 LocalMemReference%serialize proc~test_serialize->none~serialize~5 none~deserialize_base AbstractDataReference%deserialize_base none~deserialize~5->none~deserialize_base proc~mapl_return MAPL_Return none~deserialize~5->proc~mapl_return proc~mapl_verify MAPL_Verify none~deserialize~5->proc~mapl_verify none~serialize_base AbstractDataReference%serialize_base none~serialize~5->none~serialize_base none~serialize~5->proc~mapl_return none~serialize~5->proc~mapl_verify none~deserialize_base->proc~mapl_return interface~mapl_assert MAPL_Assert none~deserialize_base->interface~mapl_assert none~serialize_base->proc~mapl_return get_length get_length none~serialize_base->get_length at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_serialize()
      type (LocalMemReference) :: a
      type (LocalMemReference) :: b
      integer, allocatable :: buffer(:)

      !empty
      a = LocalMemReference(pFIO_REAL64, [0,1,1,1])
      @assertTrue( associated(a%i_ptr))
      @assertTrue( size(a%i_ptr) == 0 )
      
      call a%serialize(buffer)
      call b%deserialize(buffer)

      @assertTrue( all(a%shape == b%shape))
      @assertTrue( a%type_kind == b%type_kind)

   end subroutine test_serialize