[phobos] Silent failure of std.container unittests

Sean Kelly sean at invisibleduck.org
Tue Jul 13 20:44:45 PDT 2010


Yeah, this has been suggested before. I may just look into submitting a patch for it. 

Sent from my iPhone

On Jul 13, 2010, at 7:28 PM, Michel Fortin <michel.fortin at michelf.com> wrote:

> Le 2010-07-13 à 21:54, Walter Bright a écrit :
> 
>> I received a litany of complaints about them.
> 
> I think you misinterpreted a little. Those complains were about all unit tests aborting at the first failing test. A better thing to do is to abort the current unit test on assert, then proceed with the next one. This way all unit tests are run, but only one error per test is reported.
> 
> Reporting more than one error per unit test adds meaningless garbage to the output output because the subsequent assertions are most of the time dependent on the first one succeeding (and thus do not indicate a different problem).
> 
> Personally, I'm not against a complete halt after the first assertion: it's simple and it forces you to fix the first bug it finds pronto. I understand that it does not please everyone though: some people just like to have the choice of which problem to fix first, or to get a general overview of the situation.
> 
> I think allowing one failed assertion per unit test is a good compromise. But allow more than that and you're lost in the noise of irrelevant assertions.
> 
> -- 
> Michel Fortin
> michel.fortin at michelf.com
> http://michelf.com/
> 
> 
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list