What I should name of a function that quits execution a condition equals true ? Deny ? Is there a common established name ?
anti_assert(1=1, errmsg);
For me it is easier to go that way because then it is possible to do macro in c/c++ like:
#define anti_assert(expression) anti_assert(expresstion, #expression)
And then in log I have the fragment of code that triggered the issue.
I really like refute
from Ruby's Minitest. Makes it instantly clear what we want (assert) vs what we don't want (refute).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With