已关闭
补充ProcessInfo3rd和PeerTargetId结构体operator<测试覆盖 #2456
lw创建于  5月28日关闭于  5月28日
lw
5月28日 创建

问题描述

当前device_manager项目中,ProcessInfo3rd和PeerTargetId结构体的operator<操作符缺少单元测试覆盖,PeerTargetId的operator==测试也不完整。

影响范围

  • test/unittest/UTTest_dm_data_struct_3rd.cpp
  • test/unittest/UTTest_dm_import_auth_code.cpp

需要补充的测试

  1. ProcessInfo3rd::operator<测试(7个用例)

    • 测试字典序比较的各个层级:tokenId → uid → processName → businessName → userId
    • 边界情况:相等对象、自比较
  2. PeerTargetId3rd::operator<测试(7个用例)

    • 测试字典序比较的各个层级:deviceId → brMac → bleMac → wifiIp → wifiPort
    • 边界情况:相等对象、自比较
  3. PeerTargetId完整测试(16个用例)

    • operator==测试(8个用例):覆盖所有字段相等/不等场景
    • operator<测试(8个用例):覆盖字典序比较的所有层级(包含serviceId字段)

测试建议

  • 运行新增的单元测试验证operator行为正确性
  • 确保所有测试通过
likedislike
openharmony_ci
openharmony_ci成员
5月28日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@hwzhangchuang](https://gitcode.com/hwzhangchuang) [@hobbycao](https://gitcode.com/hobbycao) [@renguang1116](https://gitcode.com/renguang1116) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
5月28日 添加了label:waiting_for_assign
Llw
5月28日 关联了pull request:test: 补充ProcessInfo3rd和PeerTargetId结构体operator<测试覆盖
openharmony_ciopenharmony_ci成员
5月28日 关闭了 issue
openharmony_ciopenharmony_ci成员
5月28日 issue状态由 待办的 改变为 已完成
yangwei_814916yangwei_814916成员
6月12日 issue类型由 任务 改变为 缺陷