1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-04 09:17:32 -05:00
v2fly/capability_test.go
2015-10-01 16:14:05 +02:00

22 lines
477 B
Go

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()
}