On Jul 15, 2010, at 3:00 PM, Walter Bright wrote:
> 
>> 
>> NOT YET:
>> 
>> 4. DESIRED: assert is NOT hacked, any failing assert ends the current 
>> unittest, the failure message is printed, execution continues with the next 
>> unittest, program ends with error code if at least one assert failed, 
>> everybody's happy.
>> 
> 
> Everybody's happy except the guys like me who want to run all the unit tests 
> in one go.

All the unit tests or all the asserts?  All the unit tests are run with this 
approach:

    module A;

    unittest {
        assert(false, "test 1a failed");
        assert(false, "test 1b failed");
    }

    unittest {
        assert(false, "test 2 failed");
    }

This should print:

    test 1a failed
    test 2 failed

I'm not sure I understand the problem of breaking unit tests into a collection 
of atomic blocks.  With version(unittest) globals can even be used if state 
should be retained across tests.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to