Skip to content

test_invalid_code_section_index()

Documentation for tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py::test_invalid_code_section_index@01f496f4.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py::test_invalid_code_section_index --fork Osaka

Test cases for JUMPF instructions with invalid target code section index.

Source code in tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@pytest.mark.parametrize(
    "container",
    [
        Container(
            name="jumpf1",
            sections=[
                Section.Code(
                    Op.JUMPF[1],
                )
            ],
        ),
        Container(
            name="jumpf2",
            sections=[
                Section.Code(
                    Op.JUMPF[2],
                ),
                Section.Code(
                    Op.STOP,
                ),
            ],
        ),
        Container(
            name="jumpf1_jumpf2",
            sections=[
                Section.Code(
                    Op.JUMPF[1],
                ),
                Section.Code(
                    Op.JUMPF[2],
                ),
            ],
        ),
    ],
    ids=lambda container: container.name,
)
def test_invalid_code_section_index(
    eof_test: EOFTestFiller,
    container: Container,
):
    """Test cases for JUMPF instructions with invalid target code section index."""
    eof_test(container=container, expect_exception=EOFException.INVALID_CODE_SECTION_INDEX)

Parametrized Test Cases

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

Test ID (Abbreviated) container
...fork_Osaka-eof_test-jumpf1 jumpf1
...fork_Osaka-eof_test-jumpf2 jumpf2
...fork_Osaka-eof_test-jumpf1_jumpf2 jumpf1_jumpf2
...fork_Osaka-state_test_from_eof_test-jumpf1 jumpf1
...fork_Osaka-state_test_from_eof_test-jumpf2 jumpf2
...fork_Osaka-state_test_from_eof_test-jumpf1_jumpf2 jumpf1_jumpf2
...fork_Osaka-blockchain_test_from_eof_test-jumpf1 jumpf1
...fork_Osaka-blockchain_test_from_eof_test-jumpf2 jumpf2
...fork_Osaka-blockchain_test_from_eof_test-jumpf1_jumpf2 jumpf1_jumpf2