mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-05 22:43:10 +00:00
better test message for failure to convert x to y
This commit is contained in:
parent
01a9048ee5
commit
fb27f336e7
@ -185,11 +185,11 @@ func TestStringToBytes(t *testing.T) {
|
||||
|
||||
b2, err := stringToBytes(s)
|
||||
if err != nil {
|
||||
t.Error("failed to convert\n\t", s, err)
|
||||
t.Error("failed to convert", s, err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(b1, b2) {
|
||||
t.Error("failed to convert stb\n\t", s, "to\n\t", b1, "\ngot\n\t", b2)
|
||||
t.Error("failed to convert ", s, "to", b1, "got", b2)
|
||||
}
|
||||
|
||||
if err := validateBytes(b2); err != nil {
|
||||
@ -224,11 +224,11 @@ func TestBytesToString(t *testing.T) {
|
||||
|
||||
s2, err := bytesToString(b)
|
||||
if err != nil {
|
||||
t.Error("failed to convert\n\t", b, err)
|
||||
t.Error("failed to convert", b, err)
|
||||
}
|
||||
|
||||
if s1 != s2 {
|
||||
t.Error("failed to convert\n\t", b, "\nto\n\t", s1, "\ngot\n\t", s2)
|
||||
t.Error("failed to convert", b, "to", s1, "got", s2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user