-
Notifications
You must be signed in to change notification settings - Fork 55
chore: ensure ctest can detect gtest unit tests #1329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR enhances the CMake configuration to integrate GoogleTest's discovery mechanism, allowing ctest (and IDEs) to detect and run individual gtest unit tests automatically. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deepin pr auto review我来对这个CMakeLists.txt的变更进行审查:
# 添加版本检查
if(CMAKE_VERSION VERSION_LESS "3.10")
message(FATAL_ERROR "CMake 3.10 or higher is required for gtest_discover_tests")
endif()
# 添加注释说明
# Use gtest_discover_tests for automatic test discovery instead of manually specifying tests
include(GoogleTest)总的来说,这个变更是积极的,它提高了测试的可维护性和自动化程度。建议可以采纳,但最好添加一些注释和版本检查来提高代码的可读性和健壮性。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
此提交使 CMake 可以通过 gtest 提供的支持发现单元测试,旨在让 IDE 等工具可以更方便的识别并运行单个单元测试而不是每次都跑完整的一组测试。
Summary by Sourcery
Enhancements: