mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 03:41:34 +00:00
unwrap: Add test for HALT state with an empty stack
Missing piece for perfect coverage. Check that an error is returned an no panic occurs. Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
This commit is contained in:
parent
4b7b71ce25
commit
78050e8b2c
1 changed files with 6 additions and 0 deletions
|
@ -101,6 +101,12 @@ func TestStdErrors(t *testing.T) {
|
|||
require.Error(t, err)
|
||||
}
|
||||
})
|
||||
t.Run("HALT state with empty stack", func(t *testing.T) {
|
||||
for _, f := range funcs {
|
||||
_, err := f(&result.Invoke{State: "HALT"}, nil)
|
||||
require.Error(t, err)
|
||||
}
|
||||
})
|
||||
t.Run("multiple return values", func(t *testing.T) {
|
||||
for _, f := range funcs {
|
||||
_, err := f(&result.Invoke{State: "HALT", Stack: []stackitem.Item{stackitem.Make(42), stackitem.Make(42)}}, nil)
|
||||
|
|
Loading…
Reference in a new issue