Commit 0c530bf5 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

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

presently, fails
parent 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 is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment