golanggohlsrtmpwebrtcmedia-serverobs-studiortcprtmp-proxyrtmp-serverrtprtsprtsp-proxyrtsp-relayrtsp-serversrtstreamingwebrtc-proxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
439 B
22 lines
439 B
package message |
|
|
|
import ( |
|
"bytes" |
|
"testing" |
|
|
|
"github.com/stretchr/testify/require" |
|
|
|
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter" |
|
) |
|
|
|
func TestWriter(t *testing.T) { |
|
for _, ca := range readWriterCases { |
|
t.Run(ca.name, func(t *testing.T) { |
|
var buf bytes.Buffer |
|
r := NewWriter(bytecounter.NewWriter(&buf), true) |
|
err := r.Write(ca.dec) |
|
require.NoError(t, err) |
|
require.Equal(t, ca.enc, buf.Bytes()) |
|
}) |
|
} |
|
}
|
|
|