1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00
v2fly/capability_test.go

22 lines
477 B
Go
Raw Normal View History

2015-10-01 10:14:05 -04:00
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()
}