-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
For a future PR:
I think we can generalize these into a test generator:
Given (1) an Opcode, (2) a list of verification stack inputs/ouputs combinations, test the opcode in many different contexts and verify it works correctly, including Call-contexts, contract creation contexts, 7702 delegation context, etc.
Something like:
def generate_context_tests_for_opcode(
opcode: Op,
inputs_outputs: List[Tuple[List[int], int]],
):
And then on a test file you can do:
@generate_context_tests_for_opcode(
opcode=Op.CLZ,
inputs_outputs=[ ( [0x01], 0x01 ), ( [0xff], 256 - 8 ), ...
)
def test_clz_in_all_contexts(
...
Originally posted by @marioevz in #1829 (comment)
Metadata
Metadata
Assignees
Labels
No labels