mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-05 19:44:32 -04:00
25 lines
449 B
Go
25 lines
449 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.New()
|
|
payload.AppendSupplier(video.Write)
|
|
|
|
assert(payload.Len(), Equals, video.Size())
|
|
}
|