Skip to content

test_returning_jumpf()

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

Generate fixtures for these test cases for Osaka with:

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

Test cases for JUMPF instruction validation in a returning sections.

Source code in tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_jumpf_validation.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@pytest.mark.parametrize(
    "container",
    [
        Container(
            name="to_0",
            sections=[
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    Op.JUMPF[0],
                    code_outputs=0,
                ),
            ],
        ),
        Container(
            name="to_2",
            sections=[
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    Op.JUMPF[2],
                    code_outputs=0,
                ),
                Section.Code(
                    Op.INVALID,
                ),
            ],
        ),
        Container(
            name="to_retf",
            sections=[
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    Op.JUMPF[2],
                    code_outputs=0,
                ),
                Section.Code(
                    Op.RETF,
                ),
            ],
        ),
    ],
    ids=lambda container: container.name,
)
def test_returning_jumpf(
    eof_test: EOFTestFiller,
    container: Container,
):
    """Test cases for JUMPF instruction validation in a returning sections."""
    eof_test(container=container, expect_exception=EOFException.INVALID_NON_RETURNING_FLAG)

Parametrized Test Cases

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

Test ID (Abbreviated) container
...fork_Osaka-eof_test-to_0 to_0
...fork_Osaka-eof_test-to_2 to_2
...fork_Osaka-eof_test-to_retf to_retf
...fork_Osaka-state_test_from_eof_test-to_0 to_0
...fork_Osaka-state_test_from_eof_test-to_2 to_2
...fork_Osaka-state_test_from_eof_test-to_retf to_retf
...fork_Osaka-blockchain_test_from_eof_test-to_0 to_0
...fork_Osaka-blockchain_test_from_eof_test-to_2 to_2
...fork_Osaka-blockchain_test_from_eof_test-to_retf to_retf