You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/common/net/timed_io_test.go

20 lines
401 B

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)
}