On 7/15/10, Walter Bright <[email protected]> wrote:
>> Assertion failure should abort the current unittest block.
>>
>> Do we all agree about the above?
>
> Not me.

That's madness!

unittest {
    auto a = something();
    assert(a !is null);
     a.stuff(); // if a is null, this is meaningless
}

> Everybody's happy except the guys like me who want to run all the unit
> tests in one go.

What you could do is:

unittest { assert(my test); }
unittest { assert(my other test); }
unittest {
  // complex test
}

It is a bit verbose, but you'd get all the results you want without
breaking cases like my first null assert one.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to