mirror of https://github.com/poanetwork/gecko.git
ids: Add test for ID.Hex
This commit is contained in:
parent
63a4915f40
commit
6f111f9dae
|
@ -150,3 +150,12 @@ func TestIDUnmarshalJSON(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestIDHex(t *testing.T) {
|
||||
id := NewID([32]byte{'a', 'v', 'a', ' ', 'l', 'a', 'b', 's'})
|
||||
expected := "617661206c61627300000000000000000000000000000000000000000000000000"
|
||||
actual := id.Hex()
|
||||
if actual != actual {
|
||||
t.Fatalf("got %s, expected %s", actual, expected)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue