added more unit-tests serialization for ptype and ctype