[phobos] Silent failure of std.container unittests

Andrei Alexandrescu andrei at erdani.com
Tue Jul 13 13:01:53 PDT 2010


On 07/13/2010 02:11 PM, Walter Bright wrote:
> The changes I made to unittest worked when released in 2.044. They were
> subsequently rewritten and broken so that unittests never failed. I
> reverted the changes back to the 2.044 version. The current behavior is
> as in 2.044, where failing asserts inside a unittest block set a global
> flag, and then when all unittests are complete, if the global flag is
> set, the program exits with an error status.

I'm not sure where the discussion leaves us, but at the end of the day 
we're in the following situation:

1. I just svn up'ed a minute ago and built dmd. It shows version 2.048.

2. This program:

unittest
{
     int x = printf("inside unittest\n");
     assert(x == 100000);
}

void main(string args[])
{
     writeln("inside main");
}

prints this:

inside unittest
test(7): unittest failure
inside main

and exits with error code zero.

Please advise.


Andrei


More information about the phobos mailing list