Boost logo

Boost :

Subject: Re: [boost] Regression testing unobservable behavior?
From: Peter Dimov (lists_at_[hidden])
Date: 2014-08-08 11:10:06

I wrote:

> I just do the obvious: increment an "assertion_failed_" global variable in
> the handler, then BOOST_TEST that it has been incremented the correct
> number of times.

Of course this only works when the code can continue after a failed
assertion without crashing. :-)

So another option is to throw from the handler. This, in turn, only works if
stack unwinding after a failed assertion doesn't crash. But that's pretty
rare. And I'm not sure that we can do any better.

Boost list run by bdawes at, gregod at, cpdaniel at, john at