feat: Add LSP plugin unit tests and frontend common initialization library
Some checks failed
Some checks failed
- Introduced `dstalk_lsp_plugin_test` for testing LSP plugin functionalities including `lsp_trim`, `lsp_frame_message`, and `lsp_parse_content_length`. - Created `dstalk_frontend_common` static library to encapsulate shared initialization logic for frontend components (CLI, GUI, Web). - Implemented configuration file discovery and service querying in `dstalk_frontend_init`. - Added internal headers for LSP and Anthropic plugins to facilitate unit testing. - Established a mailroom system for asynchronous message passing between stateless agents, enhancing coordination and context management.
This commit is contained in:
@@ -212,6 +212,40 @@ target_link_libraries(dstalk_network_plugin_test
|
||||
|
||||
add_test(NAME dstalk_network_plugin_test COMMAND dstalk_network_plugin_test)
|
||||
|
||||
# ============================================================
|
||||
# dstalk_lsp_plugin_test — LSP 插件单元测试 (GoogleTest, 新增)
|
||||
# 覆盖: lsp_trim / lsp_frame_message / lsp_parse_content_length
|
||||
# ============================================================
|
||||
|
||||
add_executable(dstalk_lsp_plugin_test
|
||||
lsp_plugin_test.cpp
|
||||
${CMAKE_SOURCE_DIR}/plugins_base/lsp/src/lsp_plugin.cpp
|
||||
)
|
||||
|
||||
target_include_directories(dstalk_lsp_plugin_test
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/dstalk_core/include
|
||||
${CMAKE_SOURCE_DIR}/plugins_base/lsp/src
|
||||
)
|
||||
|
||||
target_compile_definitions(dstalk_lsp_plugin_test
|
||||
PRIVATE
|
||||
BOOST_JSON_HEADER_ONLY
|
||||
BOOST_ALL_NO_LIB
|
||||
)
|
||||
|
||||
target_compile_features(dstalk_lsp_plugin_test
|
||||
PRIVATE cxx_std_17
|
||||
)
|
||||
|
||||
target_link_libraries(dstalk_lsp_plugin_test
|
||||
PRIVATE
|
||||
dstalk
|
||||
boost::boost
|
||||
)
|
||||
|
||||
add_test(NAME dstalk_lsp_plugin_test COMMAND dstalk_lsp_plugin_test)
|
||||
|
||||
# ============================================================
|
||||
# coverage — gcovr 覆盖率报告 (HTML + 终端摘要)
|
||||
# 用法: cmake --build <dir> --target coverage
|
||||
|
||||
Reference in New Issue
Block a user