easier to debug assert

This commit is contained in:
2024-05-13 21:11:40 +02:00
parent 9b423f9c83
commit e127ff8c29

View File

@@ -6,6 +6,7 @@
*/
#include <iostream>
#include <stdexcept>
/**
* \def TEST_SUCCESSFUL
@@ -37,6 +38,5 @@
if (!static_cast<bool>(__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 !"); \
}