$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Voronkov Konstantin (beowinkle_at_[hidden])
Date: 2005-08-15 08:29:09
Thanks a lot a missed that topic in docs,
Konstantin
Andreas Huber wrote:
> Hi Konstantin
> 
> Voronkov Konstantin <beowinkle <at> yahoo.com> writes:
> 
>>I have a question whether there is a way to say that exception
>>  is expected/unexpected in Boost.Test-based Test Case? And
>>depends on this the Test Case is threated as passed or failed.
> 
> 
> You can check for expected exceptions with the following macros:
> 
> BOOST_WARN_THROW( statement, exception )
> BOOST_CHECK_THROW( statement, exception )
> BOOST_REQUIRE_THROW( statement, exception )
> 
> (see 
> <http://www.boost.org/libs/test/doc/components/test_tools/reference/index.html>
> )
> 
> You can check for unexpected exceptions by simply letting the exception escape 
> out of test_main (in which case the test is aborted and fails) or with the 
> following macros:
> 
> BOOST_WARN_NO_THROW( statement )
> BOOST_CHECK_NO_THROW( statement )
> BOOST_REQUIRE_NO_THROW( statement )
> 
> HTH,
>