Skip to content

Commit 8376f7c

Browse files
committed
Add DATACOPY to evm.memory_access test
1 parent 8fc4d9a commit 8376f7c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unittests/evm_memory_test.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ memory_access_opcode memory_access_opcodes[] = {
123123
{OP_MSTORE8, 0, -1},
124124
{OP_MCOPY, 0, 2},
125125
{OP_MCOPY, 1, 2},
126+
{OP_DATACOPY, 0, 2},
126127
{OP_EXTCODECOPY, 1, 3},
127128
{OP_RETURNDATACOPY, 0, 2},
128129
{OP_LOG0, 0, 1},
@@ -208,6 +209,15 @@ TEST_P(evm, memory_access)
208209

209210
code += bytecode{t.opcode};
210211

212+
if (t.opcode == OP_DATACOPY)
213+
{
214+
if (is_advanced())
215+
continue;
216+
217+
code += bytecode{OP_STOP};
218+
code = eof1_bytecode(code, 3, bytes(32, 0));
219+
}
220+
211221
const auto gas = 8796294610952;
212222
execute(gas, code);
213223

0 commit comments

Comments
 (0)