@@ -57,8 +57,8 @@ var TestVectors = map[string]*testVector{
57
57
},
58
58
"DNS" : {
59
59
Pattern : DNS ,
60
- Good : []string {"/dnsaddr/example.io" , "/ dns4/example.io" , "/dns6/example.io" , "/dns/exmaple.io" },
61
- Bad : []string {"/ip4/127.0.0.1" },
60
+ Good : []string {"/dns4/example.io" , "/dns6/example.io" , "/dns/exmaple.io" },
61
+ Bad : []string {"/dnsaddr/example.io" , "/ ip4/127.0.0.1" },
62
62
},
63
63
"WebRTCDirect" : {
64
64
Pattern : WebRTCDirect ,
@@ -67,8 +67,8 @@ var TestVectors = map[string]*testVector{
67
67
},
68
68
"HTTP" : {
69
69
Pattern : HTTP ,
70
- Good : []string {"/ip4/1.2.3.4/http" , "/dns4/example.io/http" , "/dns6/::/tcp/7011/http" , "/dnsaddr/example.io/http" , "/ ip6/fc00::/http" },
71
- Bad : []string {"/ip4/1.2.3.4/https" , "/ip4/0.0.0.0/tcp/12345/quic" , "/ip6/fc00::/tcp/5523" },
70
+ Good : []string {"/ip4/1.2.3.4/http" , "/dns4/example.io/http" , "/dns6/::/tcp/7011/http" , "/ip6/fc00::/http" },
71
+ Bad : []string {"/ip4/1.2.3.4/https" , "/ip4/0.0.0.0/tcp/12345/quic" , "/ip6/fc00::/tcp/5523" , "/dnsaddr/example.io/http" },
72
72
},
73
73
"HTTPS" : {
74
74
Pattern : HTTPS ,
@@ -79,6 +79,9 @@ var TestVectors = map[string]*testVector{
79
79
80
80
func TestProtocolMatching (t * testing.T ) {
81
81
for name , tc := range TestVectors {
82
+ name := name
83
+ tc := tc
84
+
82
85
t .Run (name , func (t * testing.T ) {
83
86
t .Parallel ()
84
87
0 commit comments