On May 2, 2010, at 1:23 PM, Walter Bright wrote: > > Andrei Alexandrescu wrote: >> Since we've been looking into this now and we have a solution in our >> collective mental caches, is there please a chance to effect this change for >> this beta? I'm telling you, it is an _important_ step forward in unittesting >> D programs. >> > > One thing I should mention is that dmd now calls a different function for > unittest asserts than the asserts normally do, and it does not regard those > calls as "terminating" calls. This means that the unittest behavior can now > be controlled by adjusting the runtime library, without affecting the assert > failure code.
I don't know if this is how you did it, but one option would be to have the unittest code set a custom assert handler, then reset it when done. The problem with this has historically been that DMD didn't generate a valid callstack for returning normally from an assert failure (for runtime code efficiency, I believe). _______________________________________________ dmd-internals mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-internals
