1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-06 18:28:00 -05:00
v2fly/common/net/timed_io_test.go
Darien Raymond bbca180dba
try protobuf
2016-08-25 21:55:49 +02:00

20 lines
401 B
Go

package net_test
import (
"testing"
. "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
)
func TestTimeOutSettings(t *testing.T) {
assert := assert.On(t)
reader := NewTimeOutReader(8, nil)
assert.Uint32(reader.GetTimeOut()).Equals(8)
reader.SetTimeOut(8) // no op
assert.Uint32(reader.GetTimeOut()).Equals(8)
reader.SetTimeOut(9)
assert.Uint32(reader.GetTimeOut()).Equals(9)
}