Xray-core/common/net/port_test.go

19 lines
287 B
Go
Raw Permalink Normal View History

2020-11-25 14:01:53 +03:00
package net_test
import (
"testing"
2020-12-04 04:36:16 +03:00
. "github.com/xtls/xray-core/common/net"
2020-11-25 14:01:53 +03:00
)
func TestPortRangeContains(t *testing.T) {
portRange := &PortRange{
From: 53,
To: 53,
}
if !portRange.Contains(Port(53)) {
t.Error("expected port range containing 53, but actually not")
}
}