1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-08-30 16:24:37 -04:00
v2fly/transport/internet/headers/srtp/srtp_test.go
2017-10-24 16:15:35 +02:00

23 lines
430 B
Go

package srtp_test
import (
"testing"
"v2ray.com/core/common/buf"
. "v2ray.com/ext/assert"
. "v2ray.com/core/transport/internet/headers/srtp"
)
func TestSRTPWrite(t *testing.T) {
assert := With(t)
content := []byte{'a', 'b', 'c', 'd', 'e', 'f', 'g'}
srtp := SRTP{}
payload := buf.NewLocal(2048)
payload.AppendSupplier(srtp.Write)
payload.Append(content)
assert(payload.Len(), Equals, len(content) + srtp.Size())
}