[dmd-internals] assert inside unittest sucks

Andrei Alexandrescu andrei at erdani.com
Sun Jun 27 20:32:37 PDT 2010


Has anyone played with the new assert semantics? I find them a 
significant step down from before.

Consider:

int x;
...
assert(x == 2, text(x));

I'm not seeing an actual message informing that an assertion has failed! 
In case it does fail the text is just printed and as such it is 
indistinguishable from regular debug chatter.

Walter, please revert the semantics of assert. This can't be worked with.

If you do want to improve things, please have assert abort the current 
unittest and continue to the next one. The current semantics is unbearable.


Andrei


More information about the dmd-internals mailing list