more test case

pull/62/head v1.1.4
v2ray 2015-12-12 17:17:23 +01:00
parent b87cc5baf1
commit 164465e60d
1 changed files with 3 additions and 0 deletions

View File

@ -119,4 +119,7 @@ func TestDomainNotMatchingDomain(t *testing.T) {
rule := parseRule([]byte(rawJson))
dest := v2net.NewTCPDestination(v2net.DomainAddress("baidu.com", 80))
assert.Bool(rule.Apply(dest)).IsFalse()
dest = v2net.NewTCPDestination(v2net.DomainAddress("www.google.com", 80))
assert.Bool(rule.Apply(dest)).IsTrue()
}