accounts/abi: Add one-parameter event test case from enriquefynn/unpack_one_arg_event

This commit is contained in:
Javier Peletier
2018-03-05 16:00:03 +01:00
256 changed files with 14988 additions and 4486 deletions

View File

@ -702,7 +702,11 @@ func TestABI_MethodById(t *testing.T) {
}
for name, m := range abi.Methods {
a := fmt.Sprintf("%v", m)
b := fmt.Sprintf("%v", abi.MethodById(m.Id()))
m2, err := abi.MethodById(m.Id())
if err != nil {
t.Fatalf("Failed to look up ABI method: %v", err)
}
b := fmt.Sprintf("%v", m2)
if a != b {
t.Errorf("Method %v (id %v) not 'findable' by id in ABI", name, common.ToHex(m.Id()))
}