Test PC Advancement¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py@b2fd7c77.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_pc_advancement.py --fork Amsterdam
Program Counter (PC) advancement tests for EIP-8024 opcodes.
Tests that verify DUPN, SWAPN, and EXCHANGE correctly advance the PC by 2 bytes (opcode + immediate byte) as specified in EIP-8024: Stack Access Instructions.
Test Functions Overview¶
| Name | Type | Cases (Amsterdam) | Description |
|---|---|---|---|
test_dupn_multiple_consecutive_pc_advancement |
state_test | 1 | Verify PC advances correctly with multiple consecutive DUPN opcodes. |
test_dupn_pc_advances_by_2 |
state_test | 1 | Verify PC advances by 2 after DUPN (opcode + immediate byte). |
test_exchange_pc_advances_by_2 |
state_test | 1 | Verify PC advances by 2 after EXCHANGE (opcode + immediate byte). |
test_mixed_opcodes_pc_advancement |
state_test | 1 | Verify PC advances correctly with mixed DUPN, SWAPN, and EXCHANGE opcodes. |
test_swapn_pc_advances_by_2 |
state_test | 1 | Verify PC advances by 2 after SWAPN (opcode + immediate byte). |