MCPcopy Create free account
hub / github.com/IBM/sarama / TestRealDecoderGetInt32Array

Function TestRealDecoderGetInt32Array

real_decoder_test.go:134–141  ·  view source on GitHub ↗

getInt32Array only diverges from getNullableInt32Array on null input

(t *testing.T)

Source from the content-addressed store, hash-verified

132
133// getInt32Array only diverges from getNullableInt32Array on null input
134func TestRealDecoderGetInt32Array(t *testing.T) {
135 t.Run("returns errInvalidArrayLength for null array", func(t *testing.T) {
136 rd := &realDecoder{raw: []byte{0xFF, 0xFF, 0xFF, 0xFF}}
137 got, err := rd.getInt32Array()
138 require.ErrorIs(t, err, errInvalidArrayLength)
139 assert.Nil(t, got)
140 })
141}
142
143func TestRealFlexibleDecoderGetNullableInt32Array(t *testing.T) {
144 tests := []struct {

Callers

nothing calls this directly

Calls 2

getInt32ArrayMethod · 0.95
RunMethod · 0.80

Tested by

no test coverage detected