diff --git a/test/common_helper/test.hpp b/test/common_helper/test.hpp index 7c10bfd..1a8dfc6 100644 --- a/test/common_helper/test.hpp +++ b/test/common_helper/test.hpp @@ -30,7 +30,7 @@ constexpr auto make_copy(auto& value) -> std::remove_cvref_t { #define TEST_SKIP(...) _ret_val_from_ctx<__VA_ARGS__>(ReturnCode::SKIPPED) #define TEST_SKIP_MSG(msg, ...) _ret_val_from_ctx<__VA_ARGS__>(ReturnCode::SKIPPED, msg) -#define ASSERT(condition, ...) ASSERT_MSG((condition), nullptr, __VA_ARGS__) +#define ASSERT(condition, ...) ASSERT_MSG((condition), "Condition (" #condition ") evaluated to false" _LOCATION, __VA_ARGS__) #define ASSERT_MSG(condition, msg, ...) { if (!(condition)) return _ret_val_from_ctx<__VA_ARGS__>(ReturnCode::FAILED, msg); } static_assert(true, "") #define ASSERT_THROWS(operation, exception_type, ...) if not consteval { try { operation; ASSERT_MSG(false, #operation " did not throw " #exception_type _LOCATION, __VA_ARGS__); } catch (exception_type &e) {} } static_assert(true, "")