set(EDITOR_UI_UNIT_TEST_SOURCES test_input_modifier_tracker.cpp test_ui_editor_command_dispatcher.cpp test_ui_editor_command_registry.cpp test_ui_editor_dock_host_interaction.cpp test_ui_editor_menu_model.cpp test_ui_editor_menu_session.cpp test_ui_editor_menu_bar.cpp test_ui_editor_menu_popup.cpp test_ui_editor_panel_content_host.cpp test_ui_editor_panel_host_lifecycle.cpp test_ui_editor_property_grid.cpp test_ui_editor_property_grid_interaction.cpp test_ui_editor_shell_compose.cpp test_ui_editor_shell_interaction.cpp test_ui_editor_collection_primitives.cpp test_ui_editor_drag_drop.cpp test_ui_editor_field_row_layout.cpp test_ui_editor_hosted_field_builders.cpp test_ui_editor_bool_field.cpp test_ui_editor_bool_field_interaction.cpp test_ui_editor_color_field.cpp test_ui_editor_color_field_interaction.cpp test_ui_editor_asset_field.cpp test_ui_editor_asset_field_interaction.cpp test_ui_editor_dock_host.cpp test_ui_editor_inline_rename_session.cpp test_ui_editor_list_view.cpp test_ui_editor_list_view_interaction.cpp test_ui_editor_panel_frame.cpp test_ui_editor_enum_field.cpp test_ui_editor_enum_field_interaction.cpp test_ui_editor_number_field.cpp test_ui_editor_number_field_interaction.cpp test_ui_editor_object_field.cpp test_ui_editor_object_field_interaction.cpp test_ui_editor_text_field.cpp test_ui_editor_text_field_interaction.cpp test_ui_editor_vector2_field.cpp test_ui_editor_vector2_field_interaction.cpp test_ui_editor_vector3_field.cpp test_ui_editor_vector3_field_interaction.cpp test_ui_editor_vector4_field.cpp test_ui_editor_vector4_field_interaction.cpp test_ui_editor_scroll_view.cpp test_ui_editor_scroll_view_interaction.cpp test_ui_editor_status_bar.cpp test_ui_editor_tab_strip.cpp test_ui_editor_tab_strip_interaction.cpp test_ui_editor_tree_view.cpp test_ui_editor_tree_view_interaction.cpp test_ui_editor_viewport_input_bridge.cpp test_ui_editor_viewport_shell.cpp test_ui_editor_viewport_slot.cpp test_ui_editor_workspace_compose.cpp test_ui_editor_workspace_interaction.cpp test_ui_editor_shortcut_manager.cpp test_ui_editor_workspace_controller.cpp test_ui_editor_workspace_layout_persistence.cpp test_ui_editor_workspace_model.cpp test_ui_editor_workspace_splitter_drag_correction.cpp test_ui_editor_workspace_session.cpp test_ui_editor_window_workspace_controller.cpp ) add_executable(editor_ui_tests ${EDITOR_UI_UNIT_TEST_SOURCES}) target_link_libraries(editor_ui_tests PRIVATE XCUIEditorLib GTest::gtest_main ) target_include_directories(editor_ui_tests PRIVATE ${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include ${CMAKE_SOURCE_DIR}/engine/include ) if(MSVC) target_compile_options(editor_ui_tests PRIVATE /utf-8 /FS) set_target_properties(editor_ui_tests PROPERTIES MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" COMPILE_PDB_NAME "editor_ui_tests-compile" COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb" COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug" COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release" COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel" COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo" ) set_property(TARGET editor_ui_tests PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif() include(GoogleTest) gtest_discover_tests(editor_ui_tests DISCOVERY_MODE PRE_TEST ) if(TARGET XCUIEditorAppLib) set(EDITOR_APP_FEATURE_TEST_SOURCES test_editor_project_runtime.cpp test_project_browser_model.cpp test_project_panel.cpp test_hierarchy_scene_binding.cpp test_scene_viewport_render_plan.cpp test_scene_viewport_runtime.cpp ) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_inspector_presentation.cpp") list(APPEND EDITOR_APP_FEATURE_TEST_SOURCES test_inspector_presentation.cpp ) endif() list(APPEND EDITOR_APP_FEATURE_TEST_SOURCES test_editor_host_command_bridge.cpp test_editor_shell_asset_validation.cpp test_structured_editor_shell.cpp test_editor_window_input_routing.cpp test_ui_editor_panel_registry.cpp test_viewport_object_id_picker.cpp ) add_executable(editor_app_feature_tests ${EDITOR_APP_FEATURE_TEST_SOURCES} ) target_link_libraries(editor_app_feature_tests PRIVATE XCUIEditorAppLib XCUIEditorAppCore XCUIEditorLib XCUIEditorHost GTest::gtest_main ) target_include_directories(editor_app_feature_tests PRIVATE ${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT}/include ${XCENGINE_EDITOR_UI_TESTS_EDITOR_ROOT} ${CMAKE_SOURCE_DIR}/engine/include ) if(MSVC) target_compile_options(editor_app_feature_tests PRIVATE /utf-8 /FS) set_target_properties(editor_app_feature_tests PROPERTIES MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>" COMPILE_PDB_NAME "editor_app_feature_tests-compile" COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb" COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug" COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release" COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel" COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo" ) set_property(TARGET editor_app_feature_tests PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif() if(WIN32 AND EXISTS "${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll") add_custom_command(TARGET editor_app_feature_tests POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/engine/third_party/assimp/bin/assimp-vc143-mt.dll $/assimp-vc143-mt.dll ) endif() gtest_discover_tests(editor_app_feature_tests DISCOVERY_MODE PRE_TEST ) endif()