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:Â http://stackoverflow.com/questions/21774387/boost-unit-testing-exceptions
Thanks again for your help.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net