You are not wrong that they are in a way "executable comments". Just like comments they are intended only for development/debugging and can't (shouldn't) have any influence on production code.
For example, in your sample code the if
is unnecessary, because condition
can't be (should not be) true
. If it were, it would be a bug. Instead it should be written as:
assert !condition;
// Very long block of code
If the condition can ever be true
then you shouldn't be using assert
.