Subject: [boost] [Boost.Test] Assertion changes in trunk? [WAS: Call for Review: Boost.Test documentation rewrite]
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2014-01-22 05:35:19
On Wed, Jan 22, 2014 at 11:25 AM, Alexander Lamaison <awl03_at_[hidden]>wrote:
> [...] As for as I'm aware, the only change is
> to the assertion macros, which move to a more natural syntax:
> BOOST_CHECK_EQUAL(a, b) becomes BOOST_TEST(a == b)
> BOOST_CHECK_LT(a, b) becomes BOOST_TEST(a < b)
> ... etc.
> BOOST_REQUIRE_EQUAL(a, b) becomes BOOST_TEST_REQUIRE(a == b)
> ... etc.
> BOOST_WARN_EQUAL(a, b) becomes BOOST_TEST_WARN(a == b)
But don't we then miss better messages which actually show the values
themselves when the assert fails? I do BOOST_CHECK(a == b) only when a and
b lack the op<<, but otherwise greatly prefer BOOST_CHECK_EQUAL(a, b). And
what's the point of going from BOOST_REQUIRE(expr) to
BOOST_TEST_REQUIRE(expr), i.e. make it longer / more typing?
What am I missing? --DD
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk