Repository navigation
test: extend tests for detail widget and app helper - #564
Conversation
|
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 1 hour and 56 minutes by commenting |
Reviewer's GuideThis test-only PR expands unit coverage across six components by adding focused Qt widget assertions, branch-specific model and callback scenarios, dependency stubs, lifecycle safeguards, and an export-success filesystem path; it also introduces the new ViewApplication test suite. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
c59e4e0 to
972f258
Compare
972f258 to
e7e81fe
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次提交无安全漏洞或严重代码问题,无需修复示例代码。 建议保持现有测试代码结构和注释质量。本报告由 AI 代码审查工具自动生成 |
e7e81fe to
3d355af
Compare
1. Add ut_viewapplication.cpp for the logViewerAuth UI layer 2. Extend ut_logdetailinfowidget.cpp and ut_logapplicationhelper.cpp 3. Extend loglistview, logiconbutton and logallexportthread tests Log: No user-facing changes Influence: 1. Run deepin-log-viewer-test with --gtest_filter='*View*;*Helper*' 2. Verify full suite passes with ASAN_OPTIONS=detect_leaks=0 3. Check lcov function coverage of viewapplication and helpers test: 扩展详情控件与应用助手单元测试 1. 新增 ut_viewapplication.cpp 覆盖 logViewerAuth 界面层 2. 扩展 ut_logdetailinfowidget.cpp 与 ut_logapplicationhelper.cpp 3. 扩展列表视图、图标按钮与全量导出线程测试 Log: 无用户可见变化 Influence: 1. 运行 deepin-log-viewer-test 过滤 View/Helper 套件 2. 以 ASAN_OPTIONS=detect_leaks=0 验证全量用例通过 3. 用 lcov 检查 viewapplication 与助手类覆盖率
3d355af to
85936d3
Compare
|
Warning
详情 {
"export": {
"tests/src/ut_logallexportthread.cpp": {
"b": [
"// Stub for exportOpsLog: creates a file at the given path and returns true.",
"bool stub_exportOpsLog(void *unused, const QString &zipFilePath)",
"// Stub for Utils::exportUserPermissionOpsLogs (static method, no `this` pointer).",
"void stub_exportUserPermissionOpsLogs(const QString &outDir, const QString &userHomeDir)",
"// Test: cover the lambda addDirToZip inside run() by making exportOpsLog succeed.",
"// This lambda is only reached when exportOpsLog returns true and the ops zip file exists.",
" QString outFile = QDir::tempPath() + \"/ut_logallexport_test.zip\";",
" stub.set(ADDR(DLDBusHandler, exportLog), LogAllExportThread_stub_bool);",
" stub.set(ADDR(DLDBusHandler, exportOpsLog), stub_exportOpsLog);",
" stub.set(ADDR(Utils, exportUserPermissionOpsLogs), stub_exportUserPermissionOpsLogs);"
]
}
}
} |
|
TAG Bot New tag: 6.5.43 |
|
[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 |
Part 6/8 of the deepin-log-viewer unit-test coverage series (single-commit PR; all 8 PRs touch disjoint file sets and are mutually independent).
Files in this PR (6 files, +1361/-101 lines)
tests/src/ut_logdetailinfowidget.cpptests/src/ut_viewapplication.cpp(new)tests/src/ut_loglistview.cpptests/src/ut_logapplicationhelper.cpptests/src/ut_logiconbutton.cpptests/src/ut_logallexportthread.cppNotes
tests/src//tests/dbusproxy//tests/ut_logviewerplugin/, globbed automatically bytests/CMakeLists.txt(re-run cmake after pulling).Summary by Sourcery
Broaden unit-test coverage for log viewer widgets, helpers, export behavior, and application lifecycle paths.
Enhancements:
Tests: