Boost logo

Boost :

Subject: Re: [boost] [test] unit tests succeed on abort?
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2008-12-29 22:07:55


On Sat, Dec 27, 2008 at 4:20 AM, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:
> Dean Michael Berris <mikhailberis <at> gmail.com> writes:
>
>> Would there be a patch that would fix this for 1.35.0? If not, where
>> should I be looking to get this fixed in 1.35.0? Because upgrading to
>> 1.36 (or anything higher for that matter) is not an option for me at
>> the moment.
>>
>> Thanks.
>>
>
> Not sure. It might've been fixed in patches applied December 14 2005.
>

Unfortunately, in another project I'm working on that uses Boost 1.36,
I still see the problem manifesting itself.

This should be simple to test:

#define BOOST_AUTO_TEST_MAIN
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE( assert_test ) {
  assert(false && !"Induced failure.");
  BOOST_CHECK(true);
}

The expected behavior is that once the test case asserts, an error
should be detected due to abnormal program termination (on a call to
std::abort).

I should say that this occurs in Linux with GCC 4.3.2.

HTH

-- 
Dean Michael C. Berris
Software Engineer, Friendster, Inc.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk