openzeppelin-contracts
openzeppelin-contracts copied to clipboard
Write invariant testing for Heap.sol
I tried testing these invariants with [Foundry Invariant Testing](https://book.getfoundry.sh/forge/invariant-testing) without success. The reason is that we need a mock to deploy within the setup function so that it acts as the target contract to validate the invariant against.
I don't think that's needed but we may want to reconsider invariant tests
Originally posted by @ernestognw in https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5084#discussion_r1687475372
Ref: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5084#discussion_r1687475978