mirror of
https://github.com/bluenviron/mediamtx
synced 2025-03-04 19:37:52 +00:00
16 lines
253 B
Go
16 lines
253 B
Go
package bytecounter
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestWriter(t *testing.T) {
|
|
var buf bytes.Buffer
|
|
w := NewWriter(&buf)
|
|
w.Write(bytes.Repeat([]byte{0x01}, 64))
|
|
require.Equal(t, uint32(64), w.Count())
|
|
}
|