From 683e78d9c357bea865ea81ad1b5c6d900c36efa7 Mon Sep 17 00:00:00 2001 From: Nik Date: Sat, 17 Dec 2022 22:28:52 +0100 Subject: [PATCH] tests: Fixed building of unit tests --- tests/patterns/source/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/patterns/source/main.cpp b/tests/patterns/source/main.cpp index 9220afe..f49ce71 100644 --- a/tests/patterns/source/main.cpp +++ b/tests/patterns/source/main.cpp @@ -41,10 +41,12 @@ int main(int argc, char **argv) { { constexpr auto DummyPragmaHandler = [](const auto&, const auto&){ return true; }; - runtime.setDataSource([&](pl::u64 address, pl::u8 *data, size_t size) { - testFile.seek(address); - testFile.readBuffer(data, size); - }, 0x00, testFile.getSize()); + runtime.setDataSource(0x00, testFile.getSize(), + [&](pl::u64 address, pl::u8 *data, size_t size) { + testFile.seek(address); + testFile.readBuffer(data, size); + } + ); runtime.setDangerousFunctionCallHandler([]{ return true; }); runtime.setIncludePaths({ includePath }); runtime.addPragma("MIME", DummyPragmaHandler); @@ -74,4 +76,4 @@ int main(int argc, char **argv) { } return EXIT_SUCCESS; -} \ No newline at end of file +}