vm: drop LoadArgs method, it's a Legacy remnant

This commit is contained in:
Roman Khimov 2021-11-19 22:25:14 +03:00
parent cd3670a199
commit b0a8f54776
2 changed files with 6 additions and 11 deletions

View file

@ -42,7 +42,12 @@ func eval(t *testing.T, src string, result interface{}) {
func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, result interface{}) {
vm := vmAndCompile(t, src)
vm.LoadArgs(op, args)
if len(args) > 0 {
vm.Estack().PushVal(args)
}
if op != nil {
vm.Estack().PushVal(op)
}
err := vm.Run()
require.NoError(t, err)
assert.Equal(t, 1, vm.Estack().Len(), "stack contains unexpected items")