diagrams-fable-qt/tests/CMakeLists.txt
Ilya Ashikhmin 4f6fe37b4d test(app): add end-to-end scenarios against the real main window
Bundled registry/sample loading, edge selection populating the grouped
property panel, undoable title edit, solver + animation clock, and a
headless render smoke check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 23:37:18 +02:00

22 lines
893 B
CMake

# Test targets are added per module; all run offscreen via ctest.
function(diag_add_test NAME)
add_executable(${NAME} ${NAME}.cpp)
target_link_libraries(${NAME} PRIVATE ${ARGN} Qt6::Test)
add_test(NAME ${NAME} COMMAND ${NAME})
set_tests_properties(${NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
endfunction()
diag_add_test(tst_model diagcore)
diag_add_test(tst_properties diagcore)
diag_add_test(tst_router diagcore)
diag_add_test(tst_solver diagcore)
diag_add_test(tst_json diagcore)
diag_add_test(tst_undo diagscene)
diag_add_test(tst_scene diagscene)
qt_add_resources(TEST_RESOURCES ${CMAKE_SOURCE_DIR}/resources/resources.qrc)
add_executable(tst_app tst_app.cpp ${TEST_RESOURCES})
target_link_libraries(tst_app PRIVATE diagapp Qt6::Test)
add_test(NAME tst_app COMMAND tst_app)
set_tests_properties(tst_app PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")