mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 03:06:16 +00:00
vm: fix typo in MEMCPY handling
This commit is contained in:
parent
931dc6c64f
commit
ab4cd8a990
2 changed files with 5 additions and 1 deletions
|
@ -1344,6 +1344,10 @@ func TestMEMCPY(t *testing.T) {
|
|||
buf := stackitem.NewBuffer([]byte{0, 1, 2, 3})
|
||||
runWithArgs(t, prog, stackitem.NewBuffer([]byte{0, 6, 7, 3}), buf, buf, 1, []byte{4, 5, 6, 7}, 2, 2)
|
||||
})
|
||||
t.Run("NonZeroDstIndex", func(t *testing.T) {
|
||||
buf := stackitem.NewBuffer([]byte{0, 1, 2})
|
||||
runWithArgs(t, prog, stackitem.NewBuffer([]byte{0, 6, 7}), buf, buf, 1, []byte{4, 5, 6, 7}, 2, 2)
|
||||
})
|
||||
t.Run("NegativeSize", getTestFuncForVM(prog, nil, stackitem.NewBuffer([]byte{0, 1}), 0, []byte{2}, 0, -1))
|
||||
t.Run("NegativeSrcIndex", getTestFuncForVM(prog, nil, stackitem.NewBuffer([]byte{0, 1}), 0, []byte{2}, -1, 1))
|
||||
t.Run("NegativeDstIndex", getTestFuncForVM(prog, nil, stackitem.NewBuffer([]byte{0, 1}), -1, []byte{2}, 0, 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue