Files
go2rtc/pkg/mpegts/mpegts_test.go
T
2023-02-17 13:07:07 +03:00

15 lines
287 B
Go

package mpegts
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestTime(t *testing.T) {
w := NewWriter()
w.WriteTime(0xFFFFFFFF)
assert.Equal(t, []byte{0x27, 0xFF, 0xFF, 0xFF, 0xFF}, w.Bytes())
ts := ParseTime(w.Bytes())
assert.Equal(t, uint32(0xFFFFFFFF), ts)
}