Boost logo

Boost :

From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2019-11-24 19:15:14


On 24.11.19 19:26, Krzysztof Jusiak via Boost wrote:
> I see your point, but I'm not advocating here for providing multiple ways
> of doing the same thing as I agree it might be confusing although I'd also
> argue that it's already a case with boost.test for example (single
> header/static/shared library or BOOST_TEST, BOOST_CHECK, BOOST_CHECK_EQ
> accomplish pretty much the same things but there are also a trade-offs here
> so it depends)

For info, BOOST_TEST does everything (and more):

https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/testing_tools/boost_test_universal_macro.html
says

"BOOST_TEST: universal and general purpose assertions"

The other macros are mostly kept for C++03 compilers and compatibility.
For the header/static/shared, this is beyond C++ itself, and IMO this is
needed when you want to address various code bases, although it creates
a lot of confusion on the users' side.

Don't get me wrong, I have nothing against or in favor of the UT library.

Since we are talking about "standard" way of testing C++ code, here are
some properties I believe are common or established [*]:

* reporting in various formats, actionable runtime, including the ones
that are understood by CI
* floating point comparison
* xUnit type of testing (fixture, suites, cases)
* "robust" to various type of exceptions

All the rest is bonus.

Raffi

[*] I have not checked what UT provides, I am a user of Boost.Test and
GoogleTest


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk