Expand description
The test outcome module
Structs§
- Expectations
- What a test’s decorators expect of the test call
- Failure
- An expectation the test did not meet
Enums§
- Expected
Outcome - How a test is expected to end
- Outcome
- How the test call ended
Constants§
- CHEATCODE_
ERROR_ 🔒SELECTOR - Selector of Foundry’s
CheatcodeError(string), the revert data of a failed cheatcode such as a failedvm.assert*
Functions§
- decode_
hex 🔒 - The bytes of an outcome’s data, which the runner records as hex so it reads well in JSON
- describe_
outcome 🔒 - The outcome as the end of a sentence, e.g. “reverted with 0x82b42900 (Unauthorized)”
- describe_
revert 🔒 - Revert data as hex, named after the contract’s error when its selector matches one, or with its
message when it is a standard error such as
Error(string)or a failed cheatcode - display_
hex 🔒 - Bytes as
0x-prefixed hex, spelling out empty data so it is not mistaken for a missing value - halt_
reason_ 🔒matches - Whether a halt reason given in a decorator names the actual reason, so
OutOfGasmatches every kind of out-of-gas halt