test: add unit tests for undo/redo commands - #565
Conversation
There was a problem hiding this comment.
Sorry @pengfeixx, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
Warning
详情 {
"unset": {
"tests/editor_undo/editor_undo_helpers.h": {
"b": [
"// \u8fd0\u884c\u73af\u5883\u6ce8\u5165\uff0c\u672c\u6587\u4ef6\u4e0d\u8bfb\u53d6/\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u65e0 qputenv/qunsetenv \u914d\u5bf9\u95ee\u9898\uff09"
]
}
}
} |
Reviewer's GuideAdds an independently buildable GTest suite for editor undo/redo commands, using Qt-backed document fixtures plus link seams for application-specific collaborators, with broad branch, boundary, round-trip, side-effect, and ownership coverage across 14 command/list test targets. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto reviewAI 代码审查报告
总体评价总分: 100/100 — 优秀 未发现严重安全问题,代码质量优秀,测试覆盖全面。本次提交为 deepin-editor 项目的 漏洞统计
四维度评分维度1: 语法逻辑 ✓ (25/25)
评价: 无编译错误,逻辑合理,边界处理完善 分析详情:
问题列表: 无 维度2: 代码质量 ✓ (25/25)
评价: 无重复代码,可读性好,符合编码规范 分析详情:
问题列表: 无 维度3: 代码性能 ✓ (20/20)
评价: 算法复杂度合理,无性能瓶颈 分析详情:
问题列表: 无 维度4: 代码安全 ✓ (30/30)
评价: 无安全风险,安全合规 分析详情: 本次提交为纯测试代码,无外部用户输入、无网络/文件操作、无命令执行、无硬编码密钥。所有容器操作使用 Qt 安全 API。 安全漏洞检查清单:
reinterpret_cast 使用说明: 安全漏洞列表: 无 改进建议本次提交代码质量优秀,无安全问题。以下为可选的改进建议(不影响评分):
审查结论本次提交为 deepin-editor 项目新增了 14 个撤销/重做命令类的单元测试,代码实现与 commit message 目的("add unit tests for undo/redo commands")完全一致。测试采用链接接缝技术隔离依赖,分支覆盖完整,正确记录了源码 defect 候选,代码质量优秀,无安全问题。建议合并。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx 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 |
Add GTest suites for text edit undo commands: insert/delete/replace, indent/unindent, drag insert, end-line format and the undo list. 新增文本编辑撤销命令的 GTest 单元测试,覆盖插入、删除、替换、缩进、 拖拽插入、行尾格式化及撤销列表。 Log: 新增撤销重做命令单元测试 Influence: 仅新增单元测试代码,不影响编辑器本体功能。
d3e07b1 to
7e6e823
Compare
|
Warning
详情 {
"unset": {
"tests/editor_undo/editor_undo_helpers.h": {
"b": [
"// \u8fd0\u884c\u73af\u5883\u6ce8\u5165\uff0c\u672c\u6587\u4ef6\u4e0d\u8bfb\u53d6/\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u65e0 qputenv/qunsetenv \u914d\u5bf9\u95ee\u9898\uff09"
]
}
}
} |
内容
新增文本编辑撤销/重做命令的 GTest 单元测试:插入、删除、替换、缩进、拖拽插入、行尾格式化及撤销列表,共 18 个文件。
说明
Summary by Sourcery
Add isolated unit-test coverage for the editor’s undo/redo command classes without changing editor functionality.
Enhancements:
Build:
Tests: