mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
remove unused testing package
This commit is contained in:
parent
5e6d0f7c71
commit
d84166ba35
@ -1,48 +0,0 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/ext/assert"
|
||||
)
|
||||
|
||||
var IsIPv4 = assert.CreateMatcher(func(a net.Address) bool {
|
||||
return a.Family().IsIPv4()
|
||||
}, "is IPv4")
|
||||
|
||||
var IsIPv6 = assert.CreateMatcher(func(a net.Address) bool {
|
||||
return a.Family().IsIPv6()
|
||||
}, "is IPv6")
|
||||
|
||||
var IsIP = assert.CreateMatcher(func(a net.Address) bool {
|
||||
return a.Family().IsIPv4() || a.Family().IsIPv6()
|
||||
}, "is IP")
|
||||
|
||||
var IsTCP = assert.CreateMatcher(func(a net.Destination) bool {
|
||||
return a.Network == net.Network_TCP
|
||||
}, "is TCP")
|
||||
|
||||
var IsUDP = assert.CreateMatcher(func(a net.Destination) bool {
|
||||
return a.Network == net.Network_UDP
|
||||
}, "is UDP")
|
||||
|
||||
var IsDomain = assert.CreateMatcher(func(a net.Address) bool {
|
||||
return a.Family().IsDomain()
|
||||
}, "is Domain")
|
||||
|
||||
func init() {
|
||||
assert.RegisterEqualsMatcher(func(a, b net.Address) bool {
|
||||
return a == b
|
||||
})
|
||||
|
||||
assert.RegisterEqualsMatcher(func(a, b net.Destination) bool {
|
||||
return a == b
|
||||
})
|
||||
|
||||
assert.RegisterEqualsMatcher(func(a, b net.Port) bool {
|
||||
return a == b
|
||||
})
|
||||
|
||||
assert.RegisterEqualsMatcher(func(a, b net.IP) bool {
|
||||
return a.Equal(b)
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user