From 146273b1b37a44504d9102e111ddb9ee38326211 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 13 Mar 2023 11:19:20 +0100 Subject: [PATCH] tests: Fixed compilation with latest libpl --- tests/includes/CMakeLists.txt | 2 +- tests/includes/source/main.cpp | 5 +++-- tests/magic/CMakeLists.txt | 2 +- tests/magic/source/main.cpp | 6 +++--- tests/patterns/CMakeLists.txt | 2 +- tests/patterns/source/main.cpp | 7 ++++--- tests/patterns/test_data/ccvxl.hexpat.vxl | Bin 0 -> 1021 bytes 7 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 tests/patterns/test_data/ccvxl.hexpat.vxl diff --git a/tests/includes/CMakeLists.txt b/tests/includes/CMakeLists.txt index c342c3e..01971fd 100644 --- a/tests/includes/CMakeLists.txt +++ b/tests/includes/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable(includes_test ) target_include_directories(includes_test PRIVATE include) -target_link_libraries(includes_test PRIVATE libpl fmt) +target_link_libraries(includes_test PRIVATE libpl fmt::fmt-header-only) set_target_properties(includes_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/tests/includes/source/main.cpp b/tests/includes/source/main.cpp index 102062b..4fbca68 100644 --- a/tests/includes/source/main.cpp +++ b/tests/includes/source/main.cpp @@ -1,9 +1,10 @@ #include -#include #include #include +#include + #include #include @@ -22,7 +23,7 @@ int main(int argc, char **argv) { fmt::print("Running test {} on test file {}\n", includeName, includeFilePath.filename().string()); // Open pattern file - pl::hlp::fs::File patternFile(includeFilePath, pl::hlp::fs::File::Mode::Read); + wolv::io::File patternFile(includeFilePath, wolv::io::File::Mode::Read); if (!patternFile.isValid()) return EXIT_FAILURE; diff --git a/tests/magic/CMakeLists.txt b/tests/magic/CMakeLists.txt index 223eee0..8ead52d 100644 --- a/tests/magic/CMakeLists.txt +++ b/tests/magic/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(PkgConfig REQUIRED) pkg_search_module(MAGIC libmagic>=5.39) target_include_directories(magic_test PRIVATE include) -target_link_libraries(magic_test PRIVATE libpl magic fmt) +target_link_libraries(magic_test PRIVATE libpl magic fmt::fmt-header-only) set_target_properties(magic_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/tests/magic/source/main.cpp b/tests/magic/source/main.cpp index 4e02d15..1f657c2 100644 --- a/tests/magic/source/main.cpp +++ b/tests/magic/source/main.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include @@ -20,7 +20,7 @@ int main(int argc, char **argv) { fmt::print("Running test {} on test file {}\n", magicName, magicFilePath.filename().string()); magic_t ctx = magic_open(MAGIC_NONE); - PL_ON_SCOPE_EXIT { magic_close(ctx); }; + ON_SCOPE_EXIT { magic_close(ctx); }; if (ctx == nullptr) return EXIT_FAILURE; diff --git a/tests/patterns/CMakeLists.txt b/tests/patterns/CMakeLists.txt index 9f49ce2..8b4dd40 100644 --- a/tests/patterns/CMakeLists.txt +++ b/tests/patterns/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable(patterns_tests ) target_include_directories(patterns_tests PRIVATE include) -target_link_libraries(patterns_tests PRIVATE libpl fmt) +target_link_libraries(patterns_tests PRIVATE libpl fmt::fmt-header-only) set_target_properties(patterns_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/tests/patterns/source/main.cpp b/tests/patterns/source/main.cpp index f49ce71..db76dbb 100644 --- a/tests/patterns/source/main.cpp +++ b/tests/patterns/source/main.cpp @@ -1,5 +1,6 @@ #include -#include + +#include #include #include @@ -27,12 +28,12 @@ int main(int argc, char **argv) { fmt::print("Running test {} on test file {}\n", patternName, testFilePath.stem().string()); // Open pattern file - pl::hlp::fs::File patternFile(patternFilePath, pl::hlp::fs::File::Mode::Read); + wolv::io::File patternFile(patternFilePath, wolv::io::File::Mode::Read); if (!patternFile.isValid()) return EXIT_FAILURE; // Open test file - pl::hlp::fs::File testFile(testFilePath, pl::hlp::fs::File::Mode::Read); + wolv::io::File testFile(testFilePath, wolv::io::File::Mode::Read); if (!testFile.isValid()) return EXIT_FAILURE; diff --git a/tests/patterns/test_data/ccvxl.hexpat.vxl b/tests/patterns/test_data/ccvxl.hexpat.vxl new file mode 100644 index 0000000000000000000000000000000000000000..7c62535a3e9ccb2ef6a2d7df002391ba3e3d725a GIT binary patch literal 1021 zcmWH`uSm^NaLmihO)SaG&tqU@V1VOfAX`8lNQ{Ef5E!u`;FO