(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func 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 | |
| 130 | func TestReadComplex(t *testing.T) { |
| 131 | raw := []byte{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…