예제 #1
0
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())
}
예제 #2
0
func decode(t *testing.T, response siesta.Response, bytes []byte) {
	decoder := siesta.NewBinaryDecoder(bytes)
	err := response.Read(decoder)
	assert(t, err, (*siesta.DecodingError)(nil))
}