2026-04-04 19:18:18 +08:00
|
|
|
# ============================================================
|
|
|
|
|
# UI Core Tests
|
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
|
|
set(UI_TEST_SOURCES
|
|
|
|
|
test_ui_core.cpp
|
2026-04-05 06:36:50 +08:00
|
|
|
test_ui_editor_collection_primitives.cpp
|
2026-04-05 07:29:27 +08:00
|
|
|
test_ui_expansion_model.cpp
|
2026-04-05 05:14:16 +08:00
|
|
|
test_layout_engine.cpp
|
2026-04-05 07:03:51 +08:00
|
|
|
test_ui_selection_model.cpp
|
2026-04-05 05:14:16 +08:00
|
|
|
test_ui_runtime.cpp
|
2026-04-05 06:23:49 +08:00
|
|
|
test_ui_text_editing.cpp
|
2026-04-05 06:33:06 +08:00
|
|
|
test_ui_text_input_controller.cpp
|
2026-04-04 19:18:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(core_ui_tests ${UI_TEST_SOURCES})
|
|
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
|
set_target_properties(core_ui_tests PROPERTIES
|
|
|
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
target_link_libraries(core_ui_tests
|
|
|
|
|
PRIVATE
|
|
|
|
|
XCEngine
|
|
|
|
|
GTest::gtest
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_include_directories(core_ui_tests PRIVATE
|
|
|
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
|
|
|
${CMAKE_SOURCE_DIR}/tests/Fixtures
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
include(GoogleTest)
|
|
|
|
|
gtest_discover_tests(core_ui_tests)
|