diff --git a/bytestream_test.go b/bytestream_test.go index 358fc28e..1a9e566b 100644 --- a/bytestream_test.go +++ b/bytestream_test.go @@ -21,6 +21,12 @@ func TestByteStreamConsumer(t *testing.T) { assert.Equal(t, expected, b.String()) } + //can consume as a string + var s string + if assert.NoError(t, cons.Consume(bytes.NewBufferString(expected), &s)) { + assert.Equal(t, expected, s) + } + // can consume as an UnmarshalBinary var bu binaryUnmarshalDummy if assert.NoError(t, cons.Consume(bytes.NewBufferString(expected), &bu)) { @@ -202,6 +208,8 @@ func TestBytestreamConsumer_Close(t *testing.T) { assert.Equal(t, expected, b.String()) assert.EqualValues(t, 0, r.calledClose) } + + } func TestBytestreamProducer_Close(t *testing.T) {