subroutine test_serialize() type (UnlimitedEntity) :: a,b integer,allocatable :: buffer(:) real, dimension(2*3*4*5) :: array real, dimension(2*3,4*5) :: a2d real, dimension(2*3,4,5) :: a3d real, dimension(2,3,4,5) :: a4d integer :: i call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(b%is_empty()) deallocate(buffer) a = UnlimitedEntity('') call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(b%is_empty()) deallocate(buffer) do i = 1, 2*3*4*5 array(i) = i*1.0 enddo a = UnlimitedEntity(10) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a = UnlimitedEntity([10,20,30]) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a = UnlimitedEntity([.true.,.false.]) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a = UnlimitedEntity('abcd') call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a = UnlimitedEntity('abcdefgh') call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a2d = reshape(array,(/2*3,4*5/)) a = UnlimitedEntity(a2d) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a3d = reshape(array,(/2*3,4,5/)) a = UnlimitedEntity(a3d) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) a4d = reshape(array,(/2,3,4,5/)) a = UnlimitedEntity(a4d) call a%serialize(buffer) call UnlimitedEntity_deserialize(buffer,b) @assertTrue(a==b) deallocate(buffer) end subroutine test_serialize