Add unit tests for OpenAI plugin and establish coding standards
- Introduced comprehensive unit tests for the OpenAI plugin, covering SSE parsing, sentinel matching, delta extraction, request building, and more. - Created a new markdown file detailing coding and naming conventions for the dstalk project, including guidelines for comments, naming rules, code organization, and memory management practices.
This commit is contained in:
@@ -152,31 +152,31 @@ target_link_libraries(dstalk-anthropic-plugin-test
|
||||
add_test(NAME dstalk-anthropic-plugin-test COMMAND dstalk-anthropic-plugin-test)
|
||||
|
||||
# ============================================================
|
||||
# dstalk-deepseek-plugin-test — DeepSeek AI 插件单元测试
|
||||
# dstalk-openai-plugin-test — OpenAI 兼容 AI 插件单元测试
|
||||
# W21.6 (qa-wang): 通过 #include source 访问 static 函数
|
||||
# ============================================================
|
||||
|
||||
add_executable(dstalk-deepseek-plugin-test
|
||||
deepseek_plugin_test.cpp
|
||||
add_executable(dstalk-openai-plugin-test
|
||||
openai_plugin_test.cpp
|
||||
)
|
||||
|
||||
target_include_directories(dstalk-deepseek-plugin-test
|
||||
target_include_directories(dstalk-openai-plugin-test
|
||||
PRIVATE ${CMAKE_SOURCE_DIR}/dstalk-core/include
|
||||
)
|
||||
|
||||
target_compile_definitions(dstalk-deepseek-plugin-test
|
||||
target_compile_definitions(dstalk-openai-plugin-test
|
||||
PRIVATE
|
||||
BOOST_JSON_HEADER_ONLY
|
||||
BOOST_ALL_NO_LIB
|
||||
)
|
||||
|
||||
target_link_libraries(dstalk-deepseek-plugin-test
|
||||
target_link_libraries(dstalk-openai-plugin-test
|
||||
PRIVATE
|
||||
dstalk
|
||||
boost::boost
|
||||
)
|
||||
|
||||
add_test(NAME dstalk-deepseek-plugin-test COMMAND dstalk-deepseek-plugin-test)
|
||||
add_test(NAME dstalk-openai-plugin-test COMMAND dstalk-openai-plugin-test)
|
||||
|
||||
# ============================================================
|
||||
# dstalk-network-plugin-test — Network 插件单元测试
|
||||
|
||||
Reference in New Issue
Block a user