C++20 μ(micro)/Unit Testing Framework
"If you liked it then you
"should have put a"_test
on it", Beyonce rule
#include <boost/ut.hpp> // import boost.ut;
constexpr auto sum(auto... values) { return (values + ...); }
int main() {
using namespace boost::ut;
"sum"_test = [] {
expect(sum(0) == 0_i);
expect(sum(1, 2) == 3_i);
expect(sum(1, 2) > 0_i and 41_i == sum(40, 2));
};
}
Running "sum"...
sum.cpp:11:FAILED [(3 > 0 and 41 == 42)]
FAILED
===============================================================================
tests: 1 | 1 failed
asserts: 3 | 2 passed | 1 failed
Additions
Support for junit-type
reporter and IDE integration
fatal(expr)
Examples
Bug Fixes
Contributors
Additions
tagging
tests
Examples
Breaking Changes
Fatal assertions with expressions
(!expect
is deprecated)
Boost::ext.UT
instead of [Boost].UT
true_b
and false_b
have been removed (instead named ""_b
should be used)
Bug Fixes
Contributors
Examples
terse
spec
""_b
named boolean expression
Breaking Changes
ut::bdd
* https://github.com/boost-experimental/ut/commit/cb8a12a0b2f1b40cd794bec95c4e3ea4ad5bfcbc
Bug Fixes
Contributors
Additions
clang-cl
support
apple-clang
and osx
support
Gitter chat
Examples
parallel runner
any_of
matcher
Parameterized tests with language syntax
CMake modernization and improvements
Breaking Changes
ut::matcher
* https://github.com/boost-experimental/ut/commit/cb8a12a0b2f1b40cd794bec95c4e3ea4ad5bfcbc
Bug Fixes
Contributors