Skip to content

test_tangled_rjumpi()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_tangled_rjumpi@[email protected].

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_tangled_rjumpi --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_tangled_rjumpi --until=PragueEIP7692

EOF code containing tangled RJUMPI paths

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
def test_tangled_rjumpi(
    eof_test: EOFTestFiller,
):
    """
    EOF code containing tangled RJUMPI paths
    """
    container = Container.Code(
        code=(
            Op.PUSH0  # [0,0]
            + Op.PUSH0  # [1,1]
            + Op.RJUMPI[8]  # [2,2]
            + Op.PUSH1(127)  # [1,1]
            + Op.RJUMPI[7]  # [2,2]
            + Op.RJUMP[5]  # [1,1]
            + Op.PUSH0  # [1,1]
            + Op.RJUMP[0]  # [2,1]
            + Op.LT  # [1,x]
            + Op.STOP  # [1,x]
        )
    )
    eof_test(
        data=container,
        expect_exception=EOFException.STACK_UNDERFLOW,
    )