mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
tests: Fixed compilation with latest libpl
This commit is contained in:
@@ -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})
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include <pl.hpp>
|
||||
#include <pl/helpers/file.hpp>
|
||||
|
||||
#include <pl/core/errors/preprocessor_errors.hpp>
|
||||
#include <pl/core/errors/evaluator_errors.hpp>
|
||||
|
||||
#include <wolv/io/file.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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})
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <pl/helpers/file.hpp>
|
||||
#include <pl/helpers/guards.hpp>
|
||||
#include <wolv/io/file.hpp>
|
||||
#include <wolv/utils/guards.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <cstdlib>
|
||||
@@ -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;
|
||||
|
||||
@@ -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})
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <pl.hpp>
|
||||
#include <pl/helpers/file.hpp>
|
||||
|
||||
#include <wolv/io/file.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <cstdlib>
|
||||
@@ -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;
|
||||
|
||||
|
||||
BIN
tests/patterns/test_data/ccvxl.hexpat.vxl
Normal file
BIN
tests/patterns/test_data/ccvxl.hexpat.vxl
Normal file
Binary file not shown.
Reference in New Issue
Block a user