diff options
| author | Martin Hořeňovský | 2022-04-16 14:12:56 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-04-16 16:33:50 +0200 |
| commit | 05e85c5652480b584287f406b2170f61b02d560c (patch) | |
| tree | 9ffc1e68450480f16dfc67e1a88a5890d7b56c9d /tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp | |
| parent | b5202576766c63a29275a8386a8e3c0439089382 (diff) | |
| download | catch3-05e85c5652480b584287f406b2170f61b02d560c.tar.gz | |
Split out Catch::cout/cerr/clog into their own file
Diffstat (limited to 'tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp')
| -rw-r--r-- | tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp index b506d8b8..725440ec 100644 --- a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +++ b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp @@ -8,11 +8,13 @@ #include <catch2/catch_test_macros.hpp> +#include <iostream> + namespace Catch { [[noreturn]] void throw_exception(std::exception const& e) { - Catch::cerr() << "====== CUSTOM HANDLER ====== run terminates because an exception was thrown.\n" - << "The message was: " << e.what() << '\n'; + std::cerr << "====== CUSTOM HANDLER ====== run terminates because an exception was thrown.\n" + << "The message was: " << e.what() << '\n'; // Avoid abort and other exceptional exits -- there is no way // to tell CMake that abort is the desired outcome of a test. exit(1); |