assert(false) with -unittest

bearophile bearophileHUGS at lycos.com
Tue Nov 16 13:06:31 PST 2010


dsimcha:

> I think this is correct.  The -unittest switch implicitly turns on asserts, and as
> far as I can tell makes the -release switch ignored.  This means that
> assert(false) is no longer special and works just like a regular assert as per TDPL.
> 
> Is this a problem in practice?  If so, please explain.

We have recently discussed a related topic. That works according to the specs. But mixing the halt with asserts is not tidy and it's not good. The conclusion was that the design is bad, but apparently it's not bad enough to justify a fix.

Bye,
bearophile


More information about the Digitalmars-d mailing list