Update logger_test.go

This commit is contained in:
rjl493456442 2025-01-13 15:55:34 +08:00 committed by GitHub
parent 7b3cb25847
commit ba4bfc79f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,18 +108,3 @@ func TestStructLogMarshalingOmitEmpty(t *testing.T) {
})
}
}
func TestErrorCompare(t *testing.T) {
err := vm.ErrExecutionReverted
if err != vm.ErrExecutionReverted {
t.Fatal("error compare")
}
// wrap err and test again
err = vm.VMErrorFromErr(err)
if err == vm.ErrExecutionReverted { // equality comparison fails
t.Fatal("error compare should fail")
}
if !errors.Is(err, vm.ErrExecutionReverted) { // check all wrapped errors
t.Fatal("error compare: err is not a vm.ErrExecutionReverted")
}
}