From e127ff8c2941ca0ce580e52c3b17a73c9c276766 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Mon, 13 May 2024 21:11:40 +0200 Subject: [PATCH] easier to debug assert --- test/test_assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_assert.h b/test/test_assert.h index 9359631..b1ca244 100644 --- a/test/test_assert.h +++ b/test/test_assert.h @@ -6,6 +6,7 @@ */ #include +#include /** * \def TEST_SUCCESSFUL @@ -37,6 +38,5 @@ if (!static_cast(__VA_ARGS__)) { \ std::cout << __FILE__ << ":" << __LINE__ << ": " << __FUNCTION_NAME__ << ": Assertion failed !\n"; \ std::cout << " " << __LINE__ << " |\t" << #__VA_ARGS__ << std::endl; \ - std::exit(TEST_FAILED); \ + throw std::runtime_error("Assertion failed !"); \ } -