Module runner

Module runner 

Source
Expand description

The Forge test runner.

Structsยง

ContractRunner
A type that executes all tests of a contract
FunctionRunner ๐Ÿ”’
Executes a single test function, returning a TestResult.
InvariantPersistedFailure ๐Ÿ”’
Holds data about a persisted invariant failure.

Constantsยง

LIBRARY_DEPLOYER
When running tests, we deploy all external libraries present in the project. To avoid additional libraries affecting nonces of senders used in tests, we are using separate address to predeploy libraries.

Functionsยง

fuzzer_with_cases ๐Ÿ”’
persisted_call_sequence ๐Ÿ”’
Helper function to load failed call sequence from file. Ignores failure if generated with different test contract than the current one.
test_paths ๐Ÿ”’
Helper function to set test corpus dir and to compose persisted failure paths.