Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] BOOST_CHECK_THROW behaviour
From: Ghyslain Leclerc (ghleclerc_at_[hidden])
Date: 2014-06-23 13:47:58

On 23/06/2014 17:19:01 +1200, Gavin Lambert wrote
>>You could try submitting that as a bug report in Trac (if it's  not already there), or waiting for Gennadiy Rozental's response.

Done.  I hope I did it properly.  Never reported a bug on Boost before.  Quoted our discussion, so that some more info is available if necessary.

>>In the  meantime, you'd need to write a more intelligent test yourself. 

I will do it manually.  Found someone on Stack Overflow who wanted the same behavior I expected and did it.  In case it helps someone, here is the snippet:

    … code that should throw ...
    BOOST_ERROR( “<function_name> did not throw anything. Expected a <exception_name>” );
catch( <exception_name> const& )
    //ok, this is the expected case
    BOOST_ERROR( “<function_name> has throw an unknown exception, but a <exception_name> was expected.” );

and the reference:

Thanks again for your help.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at