You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2022. It is now read-only.
evm_test.go seems like a good candidate to be rewritten as a single table-based test where we:
Set up some initial state, i.e. accounts/storage
Run some bytecode
Check return value equals expected
There is a small amount of code that does something a little more exotic (like checking for infinite loops) but I suspect it could be folded in.
Ideally we would refactor to achieve the following:
Single test harness running one test per row of initial state, code, expected results in a table structure
Use the opcode constant symbols (older tests use literal byte values) and MustSplice to make code more readable
Make the test harness pluggable so that we can run identical tests against different Callables
The idea of the last point is that we could test both the executor and the EVM with the same bytecode when testing our transaction execution machinery. Currently there is some VM functionality only tested in execution_test.go (which needs refactoring). If we can wrap the EVM as callable and the executor as a callable we should be able to run a complete battery of EVM tests under different execution scenarios rather the recreating an incomplete subset of VM tests at each level.
The text was updated successfully, but these errors were encountered:
evm_test.go seems like a good candidate to be rewritten as a single table-based test where we:
There is a small amount of code that does something a little more exotic (like checking for infinite loops) but I suspect it could be folded in.
Ideally we would refactor to achieve the following:
initial state, code, expected results
in a table structureMustSplice
to make code more readableCallables
The idea of the last point is that we could test both the
executor
and theEVM
with the same bytecode when testing our transaction execution machinery. Currently there is some VM functionality only tested in execution_test.go (which needs refactoring). If we can wrap the EVM as callable and the executor as a callable we should be able to run a complete battery of EVM tests under different execution scenarios rather the recreating an incomplete subset of VM tests at each level.The text was updated successfully, but these errors were encountered: