joy4/writer_test.go
2015-12-07 11:37:07 +08:00

20 lines
256 B
Go

package ts
import (
"testing"
"encoding/hex"
"bytes"
)
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()))
}