Skip to content

test_jumpf_to_self()

Documentation for tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py::test_jumpf_to_self@21fb11c8.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py::test_jumpf_to_self --fork Osaka

Tests JUMPF jumping to self.

Source code in tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
def test_jumpf_to_self(
    eof_state_test: EOFStateTestFiller,
):
    """Tests JUMPF jumping to self."""
    eof_state_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.SLOAD(slot_code_worked)
                    + Op.ISZERO
                    + Op.RJUMPI[1]
                    + Op.STOP
                    + Op.SSTORE(slot_code_worked, value_code_worked)
                    + Op.JUMPF[0],
                )
            ],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
        data=b"\1",
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Osaka-eof_test
...fork_Osaka-eof_state_test
...fork_Osaka-eof_blockchain_test