test_swapn_full_stack()¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_full_stack@02aafd78.
Generate fixtures for these test cases for Bogota with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_full_stack --fork Bogota
Test SWAPN succeeds on a completely full stack.
SWAPN swaps in place without pushing, so it must work at the stack
limit. The top marker is swapped down to position stack_index + 1;
popping stack_index items then exposes it. If a faulty
implementation had not swapped, the popped-to item would hold the
planted deep marker instead, so either direction of failure is
visible in storage.
Source code in tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 2 forks.