[Test] Optimize log module test cases (fix memory safety + improve coverage)#1
Open
JueBaby1120 wants to merge 1 commit intoZEMINGMA:masterfrom
Open
[Test] Optimize log module test cases (fix memory safety + improve coverage)#1JueBaby1120 wants to merge 1 commit intoZEMINGMA:masterfrom
JueBaby1120 wants to merge 1 commit intoZEMINGMA:masterfrom
Conversation
Owner
|
已收到,感谢来信。祝好!
|
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.
优化目的
提升日志模块测试用例的健壮性、完整性和可维护性,修复潜在内存安全问题,确保日志功能测试覆盖核心场景。
核心改动
log_loop函数添加空指针校验,避免非法解引用崩溃;LogTest::init增加默认日志文件路径,解决参数声明与调用不一致问题;测试验证
LogRotateTest.RotateBySize+LogLevelTest.CheckEnableStatus);依赖说明
common/file/file.h工具类(用于文件操作),无新增第三方依赖。