standard: improve testing code

staticcheck: SA4021: x = append(y) is equivalent to x = y
This commit is contained in:
Roman Khimov 2021-05-12 19:12:09 +03:00
parent 333f778aa6
commit b8ba923874

View file

@ -60,7 +60,7 @@ func TestComplyMethodParameterCount(t *testing.T) {
t.Run("Event", func(t *testing.T) { t.Run("Event", func(t *testing.T) {
m := fooMethodBarEvent() m := fooMethodBarEvent()
ev := m.ABI.GetEvent("bar") ev := m.ABI.GetEvent("bar")
ev.Parameters = append(ev.Parameters[:0]) ev.Parameters = ev.Parameters[:0]
err := Comply(m, &Standard{Manifest: *fooMethodBarEvent()}) err := Comply(m, &Standard{Manifest: *fooMethodBarEvent()})
require.True(t, errors.Is(err, ErrInvalidParameterCount)) require.True(t, errors.Is(err, ErrInvalidParameterCount))
}) })