joy4/writer_test.go
2016-04-19 21:33:07 +08:00

18 lines
259 B
Go

package ts
import (
"bytes"
"encoding/hex"
"testing"
)
func TestWriteTSHeader(t *testing.T) {
bw := &bytes.Buffer{}
w := &TSWriter{
W: bw,
PCR: 0x12345678,
}
w.Write([]byte{'h', 'e', 'l', 'o'}[:], false)
t.Logf("\n%s", hex.Dump(bw.Bytes()))
}