feat: add unit tests for core modules and protocol integration tests#1046
Draft
deepin-wm wants to merge 1 commit into
Draft
feat: add unit tests for core modules and protocol integration tests#1046deepin-wm wants to merge 1 commit into
deepin-wm wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm 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 |
6a8dd7a to
74f4dcb
Compare
1. Add 6 core unit test directories covering gestures, togglable gestures, shortcut controller, wallpaper config, output config state, and protocol integration 2. Add 7 additional mock-based test directories covering backlight, lockscreen, greeter proxy, output scale, window config store, xresource, and xsettings 3. Fix testSwipeGesturePositionConstraints: maximumX expected value corrected to 99 (QRect::right() = x + width - 1) 4. Fix testDeactivateTriggeredExactHalfFactor: expected state changed to Active when factor == 0.5 (< 0.5 is false, goes to activate branch) 5. Fix test_protocol_integration TIMEOUT from 15s to 60s 6. Add TODO comments for modules requiring runtime dependencies 7. Make Output::constrainToValidArea and XResource::splitXResourceLine accessible for testing 8. Fix GestureRecognizer unregister/deleteLater double-free risk 9. Fix protocol integration test compilation (lambda captures, WServer::attach template usage) Log: Added comprehensive unit tests for treeland core modules and protocol integration Influence: 1. Run ctest to verify all unit tests pass 2. Verify test_protocol_integration runs within 60s timeout 3. Test gesture position constraints with QRect boundary values 4. Test togglable gesture state transitions at exact 0.5 factor feat: 为核心模块添加单元测试及协议集成测试 1. 新增6个核心单元测试目录,覆盖手势、可切换手势、快捷键控制器、壁纸配置、输出配置状态和协议集成 2. 新增7个基于mock的测试目录,覆盖背光、锁屏、欢迎代理、输出缩放、窗口配置存储、X资源和X设置 3. 修复testSwipeGesturePositionConstraints:maximumX期望值修正为99(QRect::right() = x + width - 1) 4. 修复testDeactivateTriggeredExactHalfFactor:factor==0.5时期望状态改为Active(< 0.5为false,走activate分支) 5. 修复test_protocol_integration TIMEOUT从15s改为60s 6. 为需要运行时依赖的模块添加TODO注释 7. 使Output::constrainToValidArea和XResource::splitXResourceLine可测试 8. 修复GestureRecognizer unregister/deleteLater双重释放风险 9. 修复协议集成测试编译问题(lambda捕获,WServer::attach模板用法) Log: 新增treeland核心模块和协议集成的综合单元测试 Influence: 1. 运行ctest验证所有单元测试通过 2. 验证test_protocol_integration在60s超时内运行 3. 测试QRect边界值的手势位置约束 4. 测试可切换手势在精确0.5因子时的状态转换 Fixes: linuxdeepin#1040 PMS: TASK-385999
74f4dcb to
9630b44
Compare
|
TAG Bot New tag: 0.8.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces closed PR #1040 with the complete unit test suite including CI fixes.