Improving unit tests
Sean Kelly
sean at invisibleduck.org
Sun Nov 9 09:27:17 PST 2008
Don wrote:
>
> Couldn't there be some hidden global bool, isInUnitTest, which is set
> when the unit tests start to run, and which is set back to false when
> the last one ends. assert() could have different behaviour depending on
> whether it's in the unit testing phase, or not.
assert currently must throw when using DMD because it doesn't generate a
fukk stack frame for the call. For unit tests though, a unit tester
could override assert only for the duration of unit testing.
Sean
More information about the Digitalmars-d
mailing list