mirror of
https://github.com/aler9/gortsplib
synced 2025-10-16 12:10:48 +08:00
enable errcheck
This commit is contained in:
@@ -10,10 +10,12 @@ import (
|
||||
func TestByteCounter(t *testing.T) {
|
||||
bc := New(bytes.NewBuffer(nil), nil, nil)
|
||||
|
||||
bc.Write([]byte{0x01, 0x02, 0x03, 0x04})
|
||||
_, err := bc.Write([]byte{0x01, 0x02, 0x03, 0x04})
|
||||
require.NoError(t, err)
|
||||
|
||||
buf := make([]byte, 2)
|
||||
bc.Read(buf)
|
||||
_, err = bc.Read(buf)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, uint64(4), bc.BytesSent())
|
||||
require.Equal(t, uint64(2), bc.BytesReceived())
|
||||
|
Reference in New Issue
Block a user