From 754012dd458985a6a4953c99204c6651318892b2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 23 Mar 2026 08:10:49 +0100 Subject: testing: enable build-host testing --- libs/kstd/tests/os_mock.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libs/kstd/tests/os_mock.cpp (limited to 'libs/kstd/tests/os_mock.cpp') diff --git a/libs/kstd/tests/os_mock.cpp b/libs/kstd/tests/os_mock.cpp new file mode 100644 index 0000000..39b7f0d --- /dev/null +++ b/libs/kstd/tests/os_mock.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include +#include + +namespace kstd::os +{ + auto panic(std::string_view message, std::source_location location) + { + auto full_message = + std::format("OS Panic Handler called '{}' at {}:{}", message, location.file_name(), location.line()); + throw std::runtime_error{full_message}; + } +} // namespace kstd::os \ No newline at end of file -- cgit v1.2.3