[dmd-internals] assert inside unittest sucks

Andrei Alexandrescu andrei at erdani.com
Sun Jul 4 15:05:30 PDT 2010


Walter, any progress on this? I understand that there is little time to 
tend to various issues, but in this case you have actually spent time on 
something that is a net pessimization.

Prior to this change all I had to do was make unittest and watch it 
failing. Now I need to actually scan visually the standard output after 
each run, otherwise failures count as successes (zero exit code).

Please revert the semantics of assert.


Thanks,

Andrei

On 06/27/2010 10:32 PM, Andrei Alexandrescu wrote:
> 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