Skip to content

Commit

Permalink
🔧 [outputter] improved failure reporting for no asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-jusiak committed Apr 15, 2024
1 parent cc6b305 commit d8a89d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ut2
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ class outputter {
}
constexpr auto on(const events::summary& event) {
if (!__builtin_is_constant_evaluated()) {
if (event.asserts[events::summary::FAILED] || event.tests[events::summary::FAILED]) {
if (!(event.asserts[events::summary::PASSED] + event.asserts[events::summary::FAILED])) {
os << "FAILED: ";
} else if (event.asserts[events::summary::FAILED] || event.tests[events::summary::FAILED]) {
os << "\nFAILED: ";
} else {
os << "PASSED: ";
Expand Down Expand Up @@ -191,7 +193,7 @@ struct override { };
* template<class... Ts> auto ut::cfg<ut::override, Ts...> = my_config{};
* @endcode
*/
template <class...> inline auto cfg = default_cfg{};
template <class...> inline default_cfg cfg{};

namespace detail {
template<class... Ts>
Expand Down

0 comments on commit d8a89d0

Please sign in to comment.