dot-xx
A personal collection of small C++ modules
|
Create an object of that class to declare a unit test. More...
Public Types | |
using | Func = TFunc |
Create an object of that class to declare a unit test.
The test must be declared in the ::tests namespace (or a namespace inside of it). The test name is inferred from the namespace it is in and either manually specified case name or the case source location.
Anonymous namespaces do not contribute to the test name
In order for the test to name properly, it must be defined via a lambda that is in the same scope as the declaration (the name is deduced from the callable type)
Do not declare UnitTests constexpr or constinit! This may lead to breaking the order of initialization!
TODO: Find a way to remove redundancy in naming and infer test name from the variable name!