[dmd-internals] changeset 455

Jason House jason.james.house at gmail.com
Wed Apr 28 13:33:28 PDT 2010


On Apr 28, 2010, at 3:53 PM, Walter Bright <walter at digitalmars.com>  
wrote:

> ----------------------------
> int x;
> void main() { }
> unittest {
>   assert(x == 3, "x should be 3");
>   assert(x == 4);
>   assert(x == 5);
> }
> --------------------------------
> Running it:
>
> test3.d(10): x should be 3
> test3(11): unittest failure
> test3(12): unittest failure

Ick. A single assert failure in a unit test should stop that test (and  
run test teardown...). Continuing past an assert failure is useless.

PS: Your file names are inconsistent in the sample output


More information about the dmd-internals mailing list