Files
remote-ui/tests/CMakeLists.txt
T
sani7 89ca146e97 Adds signal testing to UI elements
Extends UI element tests to include signal emission verification.

This ensures that UI elements correctly emit signals upon user interaction,
improving the reliability and responsiveness of the UI.

Adds QSignalSpy to track signal emissions for various UI components like
buttons, checkboxes, comboboxes, items, sliders, textboxes and thermos.
2026-02-14 14:32:17 +01:00

41 lines
1004 B
CMake

# Third Party
find_package(GTest QUIET)
find_package(Qt6 REQUIRED COMPONENTS Core Test)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# tests
file(GLOB_RECURSE TEST_SOURCES "*.[hc]pp")
file(GLOB_RECURSE CAN "../server/CAN/to_id.cpp")
if (GTest_FOUND)
message(STATUS "GTest found - building target tests")
add_executable(tests ${TEST_SOURCES} ${CAN})
target_compile_options(tests PRIVATE $<$<CONFIG:Debug>:
-Wall -Wextra -pedantic-errors -Wconversion -Wsign-conversion
>)
target_link_libraries(tests
PRIVATE
UI
gtest
magic_enum::magic_enum
GTest::gtest_main
Qt::Core
Qt::Test
)
target_include_directories(tests
PUBLIC
${CMAKE_SOURCE_DIR}/external/cpp-templates
${CMAKE_CURRENT_LIST_DIR}
${PROJECT_BINARY_DIR}
)
include(GoogleTest)
gtest_discover_tests(tests)
else()
message(STATUS "GTest not found - not building target tests")
endif()