You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, for relatively simple assertions, it's possible to keep the entire assertion within the single assert( … ) statement; but I have a few places in my code where monstrosities like the following arise:
Basically, sometimes, there's an expensive operation (i.e. not something I can safely leave laying around outside the assert, to end up in production code) that's necessary to choose how to assert something else.
Since I suspect asking for a to-be-compiled-out assert { … } block is unlikely to be in-line with the project goals, can I simply get a runtime-cheap boolean-property that I can test, to preform more complicated assertions that won't be compiled-out?
So, for relatively simple assertions, it's possible to keep the entire assertion within the single
assert( … )
statement; but I have a few places in my code where monstrosities like the following arise:Basically, sometimes, there's an expensive operation (i.e. not something I can safely leave laying around outside the
assert
, to end up in production code) that's necessary to choose how to assert something else.Since I suspect asking for a to-be-compiled-out
assert { … }
block is unlikely to be in-line with the project goals, can I simply get a runtime-cheap boolean-property that I can test, to preform more complicated assertions that won't be compiled-out?The text was updated successfully, but these errors were encountered: