mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
tests: Log exceptions thrown inside of unit tests
This commit is contained in:
@@ -37,7 +37,11 @@ class TestFailedException : public std::exception {
|
||||
try { \
|
||||
fxn(__VA_ARGS__); \
|
||||
dstream << "[PASS] "; \
|
||||
} catch (...) { \
|
||||
} catch (TestFailedException &e) { \
|
||||
dstream << "[FAIL] "; \
|
||||
num_tests_failed++; \
|
||||
} catch (std::exception &e) { \
|
||||
dstream << "Caught unhandled exception: " << e.what() << std::endl; \
|
||||
dstream << "[FAIL] "; \
|
||||
num_tests_failed++; \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user