Boost logo

Boost Users :

Subject: Re: [Boost-users] Quick Unit Test Question
From: Chris Cleeland (chris.cleeland_at_[hidden])
Date: 2012-01-09 13:41:28


My understanding is that WARN is working the way it's supposed to--it
just warns you that something doesn't match, but a warning by itself
doesn't cause something to be flagged as a failure. If you want a
failure, use CHECK or REQUIRE (depending on whether you want further
checks to be made or for testing to stop immediately).

On Mon, Jan 9, 2012 at 12:21 PM, Brad Tilley <kj4eit_at_[hidden]> wrote:
> Hey everyone,
>
> I can make BOOST_CHECK produce a failure message like this:
>
>  BOOST_AUTO_TEST_CASE( test_case2 )
>  {
>             BOOST_CHECK( 1+1 == 3 );
>  }
>
> But when I try BOOST_WARN, all tests pass:
>
>  BOOST_AUTO_TEST_CASE( test_case3 )
>  {
>             BOOST_WARN( 1+1 == 3 );
>  }
>
> Running 3 test cases...
>
> *** No errors detected
>
>
> Perhaps I'm doing something wrong. Can someone point me in the right
> direction? Both BOOST_REQUIRE and BOOST_CHECK work OK. It's only
> BOOST_WARN that does not work for my testing.
>
> Thanks,
>
> Brad
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
Chris Cleeland

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