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~serialize~18 UnlimitedEntity%serialize proc~test_serialize~3->none~serialize~18 proc~attribute_deserialize Attribute_deserialize proc~test_serialize~3->proc~attribute_deserialize interface~mapl_assert MAPL_Assert none~serialize~18->interface~mapl_assert interface~serialize_buffer_length serialize_buffer_length none~serialize~18->interface~serialize_buffer_length interface~serialize_intrinsic serialize_intrinsic none~serialize~18->interface~serialize_intrinsic none~get_rank UnlimitedEntity%get_rank none~serialize~18->none~get_rank proc~mapl_return MAPL_Return none~serialize~18->proc~mapl_return proc~attribute_deserialize->proc~mapl_return proc~mapl_verify MAPL_Verify proc~attribute_deserialize->proc~mapl_verify proc~unlimitedentity_deserialize UnlimitedEntity_deserialize proc~attribute_deserialize->proc~unlimitedentity_deserialize none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape 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 proc~unlimitedentity_deserialize->interface~mapl_assert proc~unlimitedentity_deserialize->interface~serialize_buffer_length proc~unlimitedentity_deserialize->none~get_rank proc~unlimitedentity_deserialize->proc~mapl_return proc~unlimitedentity_deserialize->proc~mapl_verify interface~deserialize_intrinsic deserialize_intrinsic proc~unlimitedentity_deserialize->interface~deserialize_intrinsic none~set~93 UnlimitedEntity%set proc~unlimitedentity_deserialize->none~set~93 none~get_shape->proc~mapl_return none~set~93->proc~mapl_return

Source Code

   subroutine test_serialize()
      type (Attribute) :: a
      type (Attribute) :: b

      integer,allocatable :: buffer(:)

      a = Attribute(10)
      call a%serialize(buffer)
      call Attribute_deserialize(buffer, b)
      @assertTrue(a==b)
      deallocate(buffer)

      a = Attribute([10,20,30])
      call a%serialize(buffer)
      call Attribute_deserialize(buffer, b)
      @assertTrue(a==b)
      deallocate(buffer)

      a = Attribute([.true.,.false.])
      call a%serialize(buffer)
      call Attribute_deserialize(buffer, b)
      @assertTrue(a==b)
      deallocate(buffer)

      a = Attribute('abcd')
      call a%serialize(buffer)
      call Attribute_deserialize(buffer, b)
      @assertTrue(a==b)
      deallocate(buffer)

      a = Attribute('abcdefgh')
      call a%serialize(buffer)
      call Attribute_deserialize(buffer, b)
      @assertTrue(a==b)
      deallocate(buffer)

   end subroutine test_serialize