-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip assertions #269
Comments
An option would be great, since there's not yet consensus on this topic. I look forward to it! |
Should the label for this feature be updated to "0.8.0"? I'm using [email protected] and assert branches are market as not covered: |
Purely out of curiosity, why do you prefer using |
Because of a require(vault.freeCollateral >= collateralAmount, "ERR_INSUFFICIENT_FREE_COLLATERAL"); Also because Solidity's SMTChecker needs both requires and assertions. |
Ah ok.. I would lean towards making this change without a major version bump since no one thinks these should branch and it's more like a bug. Thanks for the SMT link - I didn't realize these have a working application now. |
Happy to help. And yes, SMTChecker is actually useful! Check out this presentation by Leonardo Alt. It uses |
@cgewecke Can probably close this issue since the fix has been merged? |
Thanks @KholdStare ... sorry for the delay. |
In OpenZeppelin, we're considering dropping some of our
assert
s and changing them torequire
(see here for some relevant discussion), changing the semantics ofassert
to 'shouldn't ever fail unless the code is buggy'. Because of that,solidity-coverage
will report a line with partial coverage on eachassert
.Could the requirement of
assert
failure being covered be dropped, or an option added to disable it (maybe with a huge error flag if the assertion ended up failing)? We'd hate to have our coverage figure drop because of a semantics difference.Thank you for your time and awesome work!
The text was updated successfully, but these errors were encountered: