mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
parent
a039ae6cdb
commit
0b58ed4a22
2 changed files with 7 additions and 2 deletions
|
@ -685,13 +685,15 @@ func TestLEFTGood(t *testing.T) {
|
|||
assert.Equal(t, []byte("ab"), vm.estack.Peek(0).Bytes())
|
||||
}
|
||||
|
||||
func TestLEFTBadLen(t *testing.T) {
|
||||
func TestLEFTGoodLen(t *testing.T) {
|
||||
prog := makeProgram(LEFT)
|
||||
vm := load(prog)
|
||||
vm.estack.PushVal([]byte("abcdef"))
|
||||
vm.estack.PushVal(8)
|
||||
vm.Run()
|
||||
assert.Equal(t, true, vm.state.HasFlag(faultState))
|
||||
assert.Equal(t, false, vm.state.HasFlag(faultState))
|
||||
assert.Equal(t, 1, vm.estack.Len())
|
||||
assert.Equal(t, []byte("abcdef"), vm.estack.Peek(0).Bytes())
|
||||
}
|
||||
|
||||
func TestRIGHTBadNoArgs(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue