From 834e5261b34e1eeeba68783e9222d0e61c5d15cd Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 18 Feb 2024 13:07:04 +0100 Subject: [PATCH] tests: Fixed tests not building --- tests/includes/source/main.cpp | 8 ++------ tests/patterns/source/main.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/includes/source/main.cpp b/tests/includes/source/main.cpp index 5439e3c..9bcd878 100644 --- a/tests/includes/source/main.cpp +++ b/tests/includes/source/main.cpp @@ -1,8 +1,5 @@ #include -#include -#include - #include #include @@ -30,8 +27,7 @@ int main(int argc, char **argv) { // Setup Pattern Language Runtime pl::PatternLanguage runtime; { - constexpr auto DummyPragmaHandler = [](const auto&, const auto&){ - pl::core::err::M0006.throwError("Include files should never use this pragma!"); + constexpr auto DummyPragmaHandler = [](const auto&, const auto&) { return false; }; @@ -66,7 +62,7 @@ int main(int argc, char **argv) { } // Execute pattern - if (!runtime.executeString(patternFile.readString())) { + if (!runtime.executeString(patternFile.readString(), "")) { fmt::print("Error during execution!\n"); if (const auto &hardError = runtime.getError(); hardError.has_value()) diff --git a/tests/patterns/source/main.cpp b/tests/patterns/source/main.cpp index 94827a5..d55b06c 100644 --- a/tests/patterns/source/main.cpp +++ b/tests/patterns/source/main.cpp @@ -68,7 +68,7 @@ int main(int argc, char **argv) { // Execute pattern - if (!runtime.executeString(patternFile.readString())) { + if (!runtime.executeString(patternFile.readString(), "")) { fmt::print("Error during execution!\n"); if (const auto &hardError = runtime.getError(); hardError.has_value())