On Wednesday, 25 September 2013 at 06:45:12 UTC, Jacob Carlborg wrote:
It's possible to implement you're own unit test handler. See:

https://github.com/D-Programming-Language/druntime/blob/master/src/core/runtime.d#L290

This changes everything! Thanks for that pointer, it really was the missing link between what I want to do and what I thought was possible.

But you most likely want to throw some kind of exception anyway. Because if an assertion is triggered in a unit test block you most likely want to end that unit test block, immediately.

Maybe... in my mind it depends on whether there are more than one test per unit test block, because I really like each failing test to be enumerated as well. But I can see the benefit - that would allow me to have tests directly in the unit test block, instead of wrapped inside delegates like it's done in specd. Ideally, a generic runner would support both immediate and deferred tests.


Reply via email to