1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-10 14:26:26 -05:00
v2fly/common/net/port_test.go

19 lines
292 B
Go
Raw Normal View History

2016-05-02 12:56:58 -04:00
package net_test
import (
"testing"
. "github.com/v2fly/v2ray-core/v5/common/net"
2016-05-02 12:56:58 -04:00
)
func TestPortRangeContains(t *testing.T) {
portRange := &PortRange{
2016-08-26 18:04:35 -04:00
From: 53,
To: 53,
2016-05-02 12:56:58 -04:00
}
2019-01-08 17:27:02 -05:00
if !portRange.Contains(Port(53)) {
t.Error("expected port range containing 53, but actually not")
}
2016-05-02 12:56:58 -04:00
}