1
0
mirror of synced 2024-12-16 01:31:16 +01:00
ImHex/plugins/builtin/tests/CMakeLists.txt
iTrooz 47362559ef
tests: Add infrastructure for testing plugins (#1538)
This PR adds a test architecture to be able to test plugins

Main infrastructure done by @WerWolv

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-02-26 20:51:08 +01:00

19 lines
540 B
CMake

project(${IMHEX_PLUGIN_NAME}_tests)
# Add new tests here #
set(AVAILABLE_TESTS
Providers/ReadWrite
Providers/InvalidResize
)
add_library(${PROJECT_NAME} SHARED
source/main.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/plugins/builtin/include)
target_link_libraries(${PROJECT_NAME} PRIVATE libimhex)
foreach (test IN LISTS AVAILABLE_TESTS)
add_test(NAME "Plugin_${IMHEX_PLUGIN_NAME}/${test}" COMMAND $<TARGET_FILE:plugins_test> "${test}" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endforeach ()