Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1.45 KB

File metadata and controls

17 lines (10 loc) · 1.45 KB

Percentage Math

This example is based on Aave's PercentageMath implementation and testing.

We have added two additional, intentionally incorrect versions of test_percentMul/Div_fuzz:

  • test_percentMul/Div_fuzz_no_expectRevert - This version omits vm.expectRevert(), demonstrating how the report appears when the fuzz test fails due to an unexpected revert.
  • test_percentMul/Div_fuzz_wrong_assert - This version modifies the assert statement, showing how the report appears when the fuzz test fails due to an actual counterexample.

To run this example, use: certoraRun PercentageMath.conf

View the report for this run.

Note: If you get a violation on an individual fuzz test method, we recommend to run with the flag --method <FUZZ_TEST_METHOD_SIGNATURE>. This filters out a few entries in the call trace that are irrelevant to that particular method. Example: This run was initiatied with certoraRun PercentageMath.conf --method "test_percentMul_fuzz_wrong_assert(uint256,uint256)"

Note: Foundry Fuzz Testing Integration is currently in an early alpha phase.