test_serialize Subroutine

public subroutine test_serialize()

Arguments

None

Calls

proc~~test_serialize~3~~CallsGraph proc~test_serialize~3 test_serialize asserttrue asserttrue proc~test_serialize~3->asserttrue none~deserialize~8 LocalMemReference%deserialize proc~test_serialize~3->none~deserialize~8 none~serialize~8 LocalMemReference%serialize proc~test_serialize~3->none~serialize~8 none~deserialize_base AbstractDataReference%deserialize_base none~deserialize~8->none~deserialize_base proc~mapl_return MAPL_Return none~deserialize~8->proc~mapl_return proc~mapl_verify MAPL_Verify none~deserialize~8->proc~mapl_verify none~serialize_base AbstractDataReference%serialize_base none~serialize~8->none~serialize_base none~serialize~8->proc~mapl_return none~serialize~8->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