mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
477 B
22 lines
477 B
package core
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/v2ray/v2ray-core/testing/unit"
|
|
)
|
|
|
|
func TestCapabilities(t *testing.T) {
|
|
assert := unit.Assert(t)
|
|
|
|
caps := NewCapabilities()
|
|
assert.Bool(caps.HasCapability(TCPConnection)).IsFalse()
|
|
|
|
caps.AddCapability(TCPConnection)
|
|
assert.Bool(caps.HasCapability(TCPConnection)).IsTrue()
|
|
|
|
caps.AddCapability(UDPConnection)
|
|
assert.Bool(caps.HasCapability(TCPConnection)).IsTrue()
|
|
assert.Bool(caps.HasCapability(UDPConnection)).IsTrue()
|
|
}
|