1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-08-04 11:34:24 -04:00
v2fly/common/net/port_test.go

19 lines
281 B
Go
Raw Normal View History

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