| 16 | |
| 17 | namespace cfg { |
| 18 | class parallel_runner : public ut::runner<> { |
| 19 | public: |
| 20 | using ut::runner<>::on; |
| 21 | |
| 22 | template <class... Ts> |
| 23 | auto on(ut::events::test<Ts...> test) { |
| 24 | std::clog << test.name << '\n'; |
| 25 | ut::runner<>::on(test); |
| 26 | } |
| 27 | |
| 28 | [[nodiscard]] auto run() -> bool { |
| 29 | #if defined(__cpp_lib_parallel_algorithm) |
| 30 | std::for_each(std::execution::par, std::cbegin(suites_), std::cend(suites_), |
| 31 | [&](const auto& suite) { suite.first(); }); |
| 32 | #else |
| 33 | std::for_each(std::cbegin(suites_), std::cend(suites_), |
| 34 | [&](const auto& suite) { suite.first(); }); |
| 35 | #endif |
| 36 | |
| 37 | suites_.clear(); |
| 38 | |
| 39 | return fails_ > 0; |
| 40 | } |
| 41 | }; |
| 42 | } // namespace cfg |
| 43 | |
| 44 | template <class... Ts> |
nothing calls this directly
no outgoing calls
no test coverage detected