提交 0c530bf5 作者: Brian Tiger Chow 提交者: Juan Batiz-Benet

tests(peer) ensure String() works when p created WithId

presently, fails
上级 1840a01f
......@@ -46,3 +46,12 @@ func TestNetAddress(t *testing.T) {
t.Error("NetAddress lookup failed", udp, udp2)
}
}
func TestStringMethodWithSmallId(t *testing.T) {
p := WithID([]byte(string(0)))
p1, ok := p.(*peer)
if !ok {
t.Fatal("WithID doesn't return a peer")
}
p1.String()
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论