1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-09 19:07:14 -05:00
v2fly/transport/internet/headers/wechat/wechat_test.go
2017-12-16 23:31:05 +01:00

25 lines
458 B
Go

package wechat_test
import (
"context"
"testing"
"v2ray.com/core/common/buf"
. "v2ray.com/core/transport/internet/headers/wechat"
. "v2ray.com/ext/assert"
)
func TestUTPWrite(t *testing.T) {
assert := With(t)
videoRaw, err := NewVideoChat(context.Background(), &VideoConfig{})
assert(err, IsNil)
video := videoRaw.(*VideoChat)
payload := buf.NewLocal(2048)
payload.AppendSupplier(video.Write)
assert(payload.Len(), Equals, video.Size())
}