used to test c++ object's serialization