Skip to content

test_mcopy_on_empty_memory()

Documentation for tests/cancun/eip5656_mcopy/test_mcopy.py::test_mcopy_on_empty_memory@verkle@v0.0.6.

Generate fixtures for these test cases for Cancun with:

Cancun only:

fill -v tests/cancun/eip5656_mcopy/test_mcopy.py::test_mcopy_on_empty_memory --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Cancun:

fill -v tests/cancun/eip5656_mcopy/test_mcopy.py::test_mcopy_on_empty_memory --until=Cancun

Perform MCOPY operations on an empty memory, using different offsets and lengths.

Source code in tests/cancun/eip5656_mcopy/test_mcopy.py
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
@pytest.mark.parametrize("dest", [0x00, 0x20])
@pytest.mark.parametrize("src", [0x00, 0x20])
@pytest.mark.parametrize("length", [0x00, 0x01])
@pytest.mark.parametrize("initial_memory", [bytes()], ids=["empty_memory"])
@pytest.mark.with_all_evm_code_types
@pytest.mark.valid_from("Cancun")
def test_mcopy_on_empty_memory(
    state_test: StateTestFiller,
    pre: Alloc,
    post: Mapping[str, Account],
    tx: Transaction,
):
    """
    Perform MCOPY operations on an empty memory, using different offsets and lengths.
    """
    state_test(
        env=Environment(),
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID evm_code_type initial_memory length src dest
evm_code_type_LEGACY-empty_memory-length_0-src_0-dest_0 LEGACY 0 0 0
evm_code_type_LEGACY-empty_memory-length_0-src_0-dest_32 LEGACY 0 0 32
evm_code_type_LEGACY-empty_memory-length_0-src_32-dest_0 LEGACY 0 32 0
evm_code_type_LEGACY-empty_memory-length_0-src_32-dest_32 LEGACY 0 32 32
evm_code_type_LEGACY-empty_memory-length_1-src_0-dest_0 LEGACY 1 0 0
evm_code_type_LEGACY-empty_memory-length_1-src_0-dest_32 LEGACY 1 0 32
evm_code_type_LEGACY-empty_memory-length_1-src_32-dest_0 LEGACY 1 32 0
evm_code_type_LEGACY-empty_memory-length_1-src_32-dest_32 LEGACY 1 32 32
evm_code_type_LEGACY-empty_memory-length_0-src_0-dest_0 LEGACY 0 0 0
evm_code_type_LEGACY-empty_memory-length_0-src_0-dest_32 LEGACY 0 0 32
evm_code_type_LEGACY-empty_memory-length_0-src_32-dest_0 LEGACY 0 32 0
evm_code_type_LEGACY-empty_memory-length_0-src_32-dest_32 LEGACY 0 32 32
evm_code_type_LEGACY-empty_memory-length_1-src_0-dest_0 LEGACY 1 0 0
evm_code_type_LEGACY-empty_memory-length_1-src_0-dest_32 LEGACY 1 0 32
evm_code_type_LEGACY-empty_memory-length_1-src_32-dest_0 LEGACY 1 32 0
evm_code_type_LEGACY-empty_memory-length_1-src_32-dest_32 LEGACY 1 32 32
evm_code_type_EOF_V1-empty_memory-length_0-src_0-dest_0 EOF_V1 0 0 0
evm_code_type_EOF_V1-empty_memory-length_0-src_0-dest_32 EOF_V1 0 0 32
evm_code_type_EOF_V1-empty_memory-length_0-src_32-dest_0 EOF_V1 0 32 0
evm_code_type_EOF_V1-empty_memory-length_0-src_32-dest_32 EOF_V1 0 32 32
evm_code_type_EOF_V1-empty_memory-length_1-src_0-dest_0 EOF_V1 1 0 0
evm_code_type_EOF_V1-empty_memory-length_1-src_0-dest_32 EOF_V1 1 0 32
evm_code_type_EOF_V1-empty_memory-length_1-src_32-dest_0 EOF_V1 1 32 0
evm_code_type_EOF_V1-empty_memory-length_1-src_32-dest_32 EOF_V1 1 32 32
evm_code_type_EOF_V1-empty_memory-length_0-src_0-dest_0 EOF_V1 0 0 0
evm_code_type_EOF_V1-empty_memory-length_0-src_0-dest_32 EOF_V1 0 0 32
evm_code_type_EOF_V1-empty_memory-length_0-src_32-dest_0 EOF_V1 0 32 0
evm_code_type_EOF_V1-empty_memory-length_0-src_32-dest_32 EOF_V1 0 32 32
evm_code_type_EOF_V1-empty_memory-length_1-src_0-dest_0 EOF_V1 1 0 0
evm_code_type_EOF_V1-empty_memory-length_1-src_0-dest_32 EOF_V1 1 0 32
evm_code_type_EOF_V1-empty_memory-length_1-src_32-dest_0 EOF_V1 1 32 0
evm_code_type_EOF_V1-empty_memory-length_1-src_32-dest_32 EOF_V1 1 32 32