mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
adding test coverage when no event is found
This commit is contained in:
parent
5a8eaf668f
commit
a72a46aab5
1 changed files with 5 additions and 0 deletions
|
|
@ -771,4 +771,9 @@ func TestABI_EventById(t *testing.T) {
|
|||
if event.Id() != topicID {
|
||||
t.Errorf("topic %v (id %v) not 'findable' by id in ABI", topic, topicID)
|
||||
}
|
||||
|
||||
UnknowntopicID := crypto.Keccak256Hash([]byte("unkownEvent"))
|
||||
if _, err := abi.EventById(UnknowntopicID); err == nil {
|
||||
t.Errorf("Expected error, no matching event id")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue