You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mettle is a "batteries included" unit testing framework for C++20. Its
mission is to provide a full toolbox to address your testing needs and to look
good doing it.
Features
Build your own assertions
Expectations (assertions) are defined using composable matchers that
automatically generate human-readable output, ensuring even complex objects are
easy to test.
Nest your tests
Suites group your tests together and can be nested as deeply as you need,
so you can use their hierarchy to set up and tear down your fixtures for you.
Don't repeat yourself
Type- and value-parameterized tests let you write your tests once and apply them
to multiple implementations or preconditions.
Aggregate everything
The mettle unified test runner makes it a snap to write multiple, independent
test files – even ones running completely different kinds of tests – and
aggregate them into a single list of results.
A Brief Example
A picture is worth a thousand words, and code's almost as good (I'm sure it's
worth at least 100 words), so let's take a look at a test file: