1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-23 12:02:58 -05:00
Files
v2fly/transport/internet/headers/wechat/wechat_test.go

25 lines
458 B
Go
Raw Normal View History

2017-01-03 22:46:22 +01:00
package wechat_test
import (
2017-12-16 23:31:05 +01:00
"context"
2017-01-03 22:46:22 +01:00
"testing"
"v2ray.com/core/common/buf"
. "v2ray.com/core/transport/internet/headers/wechat"
2017-10-26 21:44:22 +02:00
. "v2ray.com/ext/assert"
2017-01-03 22:46:22 +01:00
)
func TestUTPWrite(t *testing.T) {
2017-10-24 16:15:35 +02:00
assert := With(t)
2017-01-03 22:46:22 +01:00
2017-12-16 23:31:05 +01:00
videoRaw, err := NewVideoChat(context.Background(), &VideoConfig{})
assert(err, IsNil)
video := videoRaw.(*VideoChat)
2017-01-03 22:46:22 +01:00
payload := buf.NewLocal(2048)
payload.AppendSupplier(video.Write)
2017-10-24 16:15:35 +02:00
assert(payload.Len(), Equals, video.Size())
2017-01-03 22:46:22 +01:00
}