Ut Versions Save

C++20 μ(micro)/Unit Testing Framework

v2.0.1

4 months ago

v2.0.0

7 months ago

μt - C++20 single header/module, macro-free μ(micro)/Unit Testing Framework

Linux MacOs Windows Coveralls Try it online

"If you liked it then you "should have put a"_test on it", Beyonce rule

UT / μt

C++ single header/single module, macro-free μ(micro)/Unit Testing Framework

#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

https://godbolt.org/z/f4jEcv9vo


v1.1.9

2 years ago