From 0e352417d683d77171b4873ee1ec54d7e6e33a28 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Sun, 20 Apr 2025 14:31:56 +0200 Subject: Make gcc more happy --- unit_tests/_pch.hpp | 2 -- unit_tests/embedded_tests.cpp | 5 ++++- unit_tests/shared.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/unit_tests/_pch.hpp b/unit_tests/_pch.hpp index 1e98c5a..f6e5fff 100644 --- a/unit_tests/_pch.hpp +++ b/unit_tests/_pch.hpp @@ -1,5 +1,3 @@ -#pragma once - #include #include #include diff --git a/unit_tests/embedded_tests.cpp b/unit_tests/embedded_tests.cpp index a0a7bb2..04a8f87 100644 --- a/unit_tests/embedded_tests.cpp +++ b/unit_tests/embedded_tests.cpp @@ -2,6 +2,7 @@ #include "shared.h" #include "lanes/src/lanes.hpp" +#if defined __has_include && __has_include() #include // ################################################################################################# @@ -265,4 +266,6 @@ TEST_CASE("lanes.embedding.with custom allocator") lua_close(L3); lua_close(L2); lua_close(L1); -} \ No newline at end of file +} + +#endif // windows.h diff --git a/unit_tests/shared.cpp b/unit_tests/shared.cpp index 2e2af73..e70d5d8 100644 --- a/unit_tests/shared.cpp +++ b/unit_tests/shared.cpp @@ -476,6 +476,7 @@ void FileRunner::performTest(FileRunnerParam const& testParam_) INFO(testParam_.script); switch (testParam_.test) { case TestType::AssertNoLuaError: + lua_atpanic(L, _atPanic); requireSuccess(root, testParam_.script); break; -- cgit v1.2.3-55-g6feb