func decodeErr(t *testing.T, response siesta.Response, bytes []byte, expected *siesta.DecodingError) { decoder := siesta.NewBinaryDecoder(bytes) err := response.Read(decoder) assert(t, err.Error(), expected.Error()) assert(t, err.Reason(), expected.Reason()) }
func decode(t *testing.T, response siesta.Response, bytes []byte) { decoder := siesta.NewBinaryDecoder(bytes) err := response.Read(decoder) assert(t, err, (*siesta.DecodingError)(nil)) }