File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export namespace CppUtils::Execution
1212
1313 public:
1414 template<String::Hasher eventName = String::Hash{}>
15- inline auto emit(const auto& event) -> void
15+ inline auto emit(const auto& event = nullptr ) -> void
1616 {
1717 using Event = std::remove_cvref_t<decltype(event)>;
1818 auto lockGuard = std::shared_lock{m_mutex};
Original file line number Diff line number Diff line change @@ -108,13 +108,13 @@ namespace CppUtils::UnitTest
108108 auto successfulTests = std::vector<std::string>{};
109109 auto failedTests = std::vector<std::string>{};
110110
111- if (auto result = m_testSuites.forEach([&](const auto& name, const auto& tests, const auto& dependencies) -> void {
111+ if (auto result = m_testSuites.forEach([&](const auto& name, const auto& tests, const auto& dependencies) -> bool {
112112 if (std::empty(tests))
113113 {
114114 Logger::print<"warning">("No tests found in test suite {}", name);
115115 testSuiteIsSuccess[name] = true;
116116 successfulTests.push_back(name);
117- return;
117+ return not settings.fastAbort ;
118118 }
119119
120120 for (const auto& dependency : dependencies)
@@ -124,6 +124,7 @@ namespace CppUtils::UnitTest
124124 auto result = std::ranges::all_of(tests, [&](const auto& test) { return executeTest(test, settings); });
125125 testSuiteIsSuccess[name] = result;
126126 (result ? successfulTests : failedTests).push_back(name);
127+ return result or not settings.fastAbort;
127128 });
128129 not result)
129130 Logger::print<"error">("The tests cannot be run: {}", result.error());
You can’t perform that action at this time.
0 commit comments