v2ray-core/common/net/port_test.go

19 lines
281 B
Go
Raw Normal View History

2016-05-02 16:56:58 +00:00
package net_test
import (
"testing"
2016-08-20 18:55:45 +00:00
. "v2ray.com/core/common/net"
"v2ray.com/core/testing/assert"
2016-05-02 16:56:58 +00:00
)
func TestPortRangeContains(t *testing.T) {
2016-05-24 19:55:46 +00:00
assert := assert.On(t)
2016-05-02 16:56:58 +00:00
portRange := &PortRange{
2016-08-26 22:04:35 +00:00
From: 53,
To: 53,
2016-05-02 16:56:58 +00:00
}
assert.Bool(portRange.Contains(Port(53))).IsTrue()
}