MCPcopy Create free account
hub / github.com/pion/rtcp / TestReadSlice

Function TestReadSlice

packet_buffer_test.go:120–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

118}
119
120func TestReadSlice(t *testing.T) {
121 expected := []uint16{0x0102, 0x0304, 0x0506, 0x0708}
122 raw := []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}
123 var output []uint16
124 buffer := packetBuffer{bytes: raw}
125 err := buffer.read(&output)
126 assert.NoError(t, err)
127 assert.Equal(t, expected, output)
128}
129
130func TestReadComplex(t *testing.T) {
131 raw := []byte{

Callers

nothing calls this directly

Calls 1

readMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…