|
dot-xx
A personal collection of small C++ modules
|
Unit testing. See dxx::selftest::run_all for usage help. More...
Classes | |
| class | dxx::selftest::UnitTest< TFunc > |
| Create an object of that class to declare a unit test. More... | |
| struct | dxx::selftest::test_failure |
| The exception type used by test assertions. More... | |
| class | dxx::selftest::LifetimeTester |
| A simple class for tracking object moves/copies during their lives in containers. More... | |
Typedefs | |
| using | dxx::selftest::TestBody = std::function<void()> |
| using | dxx::selftest::TestsMap = std::map<std::string, TestBody> |
Functions | |
| void | dxx::selftest::test (bool condition, std::source_location st=std::source_location::current()) |
| Test assertion. Calls dxx::assert::always with test_failure. | |
| int | dxx::selftest::run_all (const std::unordered_set< std::string > &filters={}) |
| Run all tests that match a filter. | |
Variables | |
| constinit std::unique_ptr< TestsMap > | dxx::selftest::all_tests = nullptr |
| Storage for all unit tests. | |
Unit testing. See dxx::selftest::run_all for usage help.
Files | |
| file | //dot-xx-selftest/4d96b5bbd3d7687e98aaef4d82b832d4e8d43321/src/selftest.xx |
| Main interface file for dxx::selftest module. | |
| file | //dot-xx-selftest/4d96b5bbd3d7687e98aaef4d82b832d4e8d43321/src/lifetime_tester.xx |
| A class for testing and tracking object lifetimes. | |
| file | //dot-xx-selftest/4d96b5bbd3d7687e98aaef4d82b832d4e8d43321/src/name_deduce.xx |
| Unit test name deduction from callable type name. | |