From d4cf96650488ea9ba3f621dd035ddc9c6ec36b4b Mon Sep 17 00:00:00 2001 From: CCP Aporia <28982391+CCP-Aporia@users.noreply.github.com> Date: Wed, 15 Jul 2026 10:56:59 +0200 Subject: [PATCH] Add test case for `CcpCrashOnPurpose` Good to have a test for this because its behaviour may change depending on the platform it runs on. --- tests/CMakeLists.txt | 1 + tests/CcpCrash.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/CcpCrash.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 63418d3..e806349 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,6 +7,7 @@ find_package(lz4 CONFIG REQUIRED) add_executable(CcpCoreTest CCPCallstack.cpp CcpCoreTest.cpp + CcpCrash.cpp CCPHash.cpp CcpFileUtils.cpp CcpMemory.cpp diff --git a/tests/CcpCrash.cpp b/tests/CcpCrash.cpp new file mode 100644 index 0000000..3c63cf6 --- /dev/null +++ b/tests/CcpCrash.cpp @@ -0,0 +1,12 @@ +// Copyright © 2026 CCP ehf. + +#include + +#include + +class CcpCrashDeathTest : public ::testing::Test {}; + +TEST_F( CcpCrashDeathTest, CrashOnPurpose ) +{ + EXPECT_DEATH( CcpCrashOnPurpose(), "" ); +}