allow writing primitives to static buffers

This commit is contained in:
aler9
2022-05-11 14:52:20 +02:00
parent ee6d7a87a3
commit c1b10a80be
19 changed files with 662 additions and 786 deletions

View File

@@ -176,9 +176,8 @@ func TestHeaderReadErrors(t *testing.T) {
func TestHeaderWrite(t *testing.T) {
for _, ca := range casesHeader {
t.Run(ca.name, func(t *testing.T) {
var buf bytes.Buffer
ca.header.write(&buf)
require.Equal(t, ca.enc, buf.Bytes())
buf := ca.header.write()
require.Equal(t, ca.enc, buf)
})
}
}