|
Boost : |
From: Gavin Lambert (boost_at_[hidden])
Date: 2019-11-24 23:12:01
On 24/11/2019 03:45, Vinnie Falco wrote:
> The same cannot be said for unit test libraries, since those types
> don't appear in public interfaces. So again what is the benefit of
> standardization?
Some possible benefits to standardising a unit test framework:
1. The unit tests for a standard library can be published in the
standard as well (using the standard unit test library), thereby acting
as additional documentation on intended behaviour and a way to verify
whether a particular implementation is conforming.
2. Having a standard vocabulary for unit tests that are likely to be
portable to more platforms and more universally understood by all
developers (once familiar with the new standard), rather than seemingly
every project using a different framework.
Having said that, I'm not entirely convinced that it is practical or
even desirable to do so, since there's still quite a lot of religious
debates about testing, such as fakes/mocks, expect vs assert, catch2
nested tests vs suites, AAA mini-tests vs. kitchen sink tests, etc.
And (especially when using mocks) it can be a little too easy to fall
into the trap of asserting the specific implementation instead of the
general behaviour, which is expressly what the standard wants to avoid.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk