Repository navigation
test(PageOverview): align empty-map row expectation with the row+1 fix - #920
Conversation
PR linuxdeepin#862 corrected the off-by-one in PageOverview::updateInfo (setColumnAndRow(row - 1) -> row + 1) after the rewritten PageOverview tests had already been merged, leaving updateInfo_emptyMap_rowMinusOne pinning the old buggy semantics: with an empty map the stub now receives 1 instead of -1, so that case fails on current master. Rename the case to updateInfo_emptyMap_passesRowPlusOne, assert the fixed semantics (g_colRow == 1) and refresh the stale row-1 comments in the related cases. All 107 Page-suite cases (PageSingleInfo 39, PageMultiInfo 34, PageOverview 17, PageBoardInfo 17) pass on current master. Log: 修正 PageOverview 空表用例预期, 与 row+1 修复语义对齐 Influence: 仅测试代码, 不影响业务逻辑
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis test-only PR updates PageOverview expectations and documentation to match the existing row + 1 off-by-one fix, including changing the empty-map expectation from -1 to 1; the targeted page test suite passes all 107 tests. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更无需修复,代码正确。测试期望值已与 PR #862 修复后的语义对齐。本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind 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 |
|
/forcemerge |
|
This pr force merged! (status: unknown) |
What this PR does
Follow-up to the PageOverview test rewrite (#913) and the off-by-one fix (#862).
#862 changed
PageOverview::updateInfofromsetColumnAndRow(row - 1)tosetColumnAndRow(row + 1)after the rewritten tests had already been merged. The merged caseUT_PageOverview.updateInfo_emptyMap_rowMinusOnestill pinned the old semantics (empty map → stub receives-1), so it fails on current master (verified locally before this change:[ FAILED ] UT_PageOverview.updateInfo_emptyMap_rowMinusOne).This PR updates the case to the fixed semantics and refreshes the stale
row - 1comments:updateInfo_emptyMap_rowMinusOne→updateInfo_emptyMap_passesRowPlusOneg_colRow == 1(empty map → row 0 →row + 1)row - 1remarks inclearWidgets_clearsTableandupdateInfo_overviewSkipped_displayWrittenTest code only; no production changes.
Verification
Summary by Sourcery
Align PageOverview test expectations with the corrected row handling.
Enhancements:
Tests: