tests: Fixed tests not building

This commit is contained in:
WerWolv
2024-02-18 13:07:04 +01:00
parent 0e2966f10d
commit 834e5261b3
2 changed files with 3 additions and 7 deletions

View File

@@ -1,8 +1,5 @@
#include <pl.hpp>
#include <pl/core/errors/preprocessor_errors.hpp>
#include <pl/core/errors/evaluator_errors.hpp>
#include <wolv/io/file.hpp>
#include <fmt/format.h>
@@ -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(), "<Source Code>")) {
fmt::print("Error during execution!\n");
if (const auto &hardError = runtime.getError(); hardError.has_value())

View File

@@ -68,7 +68,7 @@ int main(int argc, char **argv) {
// Execute pattern
if (!runtime.executeString(patternFile.readString())) {
if (!runtime.executeString(patternFile.readString(), "<Source Code>")) {
fmt::print("Error during execution!\n");
if (const auto &hardError = runtime.getError(); hardError.has_value())