
Then it looks like I shouldn't catch the assert. Let me present the situation clearer, and see if I can change the underlying assert(). SimulationId simId = AddSimulation(...) SimulationId is an object designed to "enforce", in very simple usages, that whenever in a scope AddSimulation() is called, a RemoveSimulation(simId) is also called. RemoveSimulation clears a flag on simId, and simId destructor asserts that the flag is cleared And so the test looks like this: void SimulationIdTest::TestDestructorAfterAddRemoveSimulation() { ... SimulationId simId = AddSimulation(...); // I want to test here that the destructor asserts(false) } But this test is within a large test suite, and the asserts(false) should be caught Possibly, there is a nicer/cleaner way to test this? Regards, -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental Sent: 21 November 2008 19:23 To: boost-users@lists.boost.org Subject: Re: [Boost-users] boost test with assert() Hicham Mouline wrote:
Is it not possible to test that it aborts, and then control that and continue running the test suite? There is no safe way to continue after SIGABORT. Gennadiy