github.com/eagleql/xray-core@v1.4.4/common/net/port_test.go (about) 1 package net_test 2 3 import ( 4 "testing" 5 6 . "github.com/eagleql/xray-core/common/net" 7 ) 8 9 func TestPortRangeContains(t *testing.T) { 10 portRange := &PortRange{ 11 From: 53, 12 To: 53, 13 } 14 15 if !portRange.Contains(Port(53)) { 16 t.Error("expected port range containing 53, but actually not") 17 } 18 }