test_swapn_full_stack()¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_full_stack@c17999c0.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_full_stack --fork Amsterdam
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
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 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 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 1 fork.