func TestSereal(t *testing.T) { u1 := &SerealUser{Name: "Sereal"} u1.Self = u1 // cyclic ref u2 := &SerealUser{} internal.RoundtripTester(t, Codec, &u1, &u2) assert.True(t, u2 == u2.Self) }
func TestGob(t *testing.T) { internal.RoundtripTester(t, Codec) }
func TestProtobuf(t *testing.T) { u1 := SimpleUser{Id: 1, Name: "John"} u2 := SimpleUser{} internal.RoundtripTester(t, Codec, &u1, &u2) assert.True(t, u1.Id == u2.Id) }