1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-09 19:58:45 -05:00
v2fly/transport/internet/headers/wechat/wechat_test.go

25 lines
449 B
Go
Raw Normal View History

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