(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestStreamHeaderAndPayload(t *testing.T) { |
| 55 | input, _ := hex.DecodeString("aabb1234") |
| 56 | r := bytes.NewReader(input) |
| 57 | var buf bytes.Buffer |
| 58 | err := StreamHeaderAndPayload(uint64(len(input)), r, &buf, nil) // no compression here |
| 59 | if err != nil { |
| 60 | t.Error(err) |
| 61 | } |
| 62 | expected, _ := hex.DecodeString("04aabb1234") |
| 63 | if !bytes.Equal(expected, buf.Bytes()) { |
| 64 | t.Error("unexpected encoding output") |
| 65 | } |
| 66 | } |
nothing calls this directly
no test coverage detected