From 379a0fa594830a50ff46b37e269d3260063be798 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:13:34 -0600 Subject: [PATCH] Add a test main that disables cpptrace exception absorption --- test/CMakeLists.txt | 1 + test/unit/main.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 test/unit/main.cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 26b7255..42e5a69 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -80,6 +80,7 @@ if(NOT CPPTRACE_SKIP_UNIT) add_executable( unittest + unit/main.cpp unit/raw_trace.cpp unit/object_trace.cpp unit/stacktrace.cpp diff --git a/test/unit/main.cpp b/test/unit/main.cpp new file mode 100644 index 0000000..7a21a4b --- /dev/null +++ b/test/unit/main.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + cpptrace::absorb_trace_exceptions(false); + return RUN_ALL_TESTS(); +}