|
Boost : |
Subject: Re: [boost] [detail][lightweight_test.hpp] Proposal to add BOOST_TEST_THROWS to boost/detail/lightweight_test.hpp
From: Peter Dimov (lists_at_[hidden])
Date: 2013-03-13 18:05:49
Ion Gaztañaga wrote:
> Another option is to define the macro empty if BOOST_NO_EXCEPTIONS is
> defined, as the throwing expression would surely call a user defined abort
> mechanism (BOOST_ASSERT or similar) when BOOST_NO_EXCEPTIONS is defined.
> Or the user should protect BOOST_TEST_THROWS calls with #ifndef
> BOOST_NO_EXCEPTIONS macros.
Both look sensible. As the user of the macro, what would you prefer? I'd
think that in a BOOST_NO_EXCEPTIONS environment it's better to remove the
test so that the rest could still be run. We don't actually test in such an
environment so the question is a bit moot though.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk