This commit is contained in:
BlockChainDev 2019-03-17 18:38:52 +00:00
parent 98096f6c20
commit 231aa29e5a

View file

@ -51,11 +51,13 @@ func TestPushAdd(t *testing.T) {
ok = peekTopEStackIsValue(t, vm, 54) ok = peekTopEStackIsValue(t, vm, 54)
assert.True(t, ok) assert.True(t, ok)
// If we try to step again, we should get an error and HALT // If we try to step again, we should get a nil error and HALT
// because we have gone over the instruction pointer // because we have gone over the instruction pointer
// error is nil because when there are nomore instructions, the vm
// will add a RET opcode and return
state, err = vm.step() state, err = vm.step()
assert.Equal(t, HALT, int(state)) assert.Equal(t, HALT, int(state))
assert.NotNil(t, err) assert.Nil(t, err)
} }