Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 为 atframe_utils 补充了多处单元测试覆盖面,并在 CI 覆盖率任务中对 lcov 输出做了过滤处理,以便得到更聚焦的覆盖率报告。
Changes:
- 为
time_utility、ini_loader::ini_value、file_system等模块补充/扩展测试用例。 - 新增
shell_font、platform_compat、murmur_hash、log_formatter的测试文件,提升模块级回归保障。 - CI 覆盖率流程中新增
lcov --remove过滤规则,生成精简后的coverage.info。
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/case/time_test.cpp | 新增 time_utility 若干接口的基础测试用例。 |
| test/case/shell_font_test.cpp | 新增 cli::shell_font/shell_stream 相关测试。 |
| test/case/platform_compat_test.cpp | 新增 platform::get_errno/get_strerrno 测试。 |
| test/case/murmur_hash_test.cpp | 新增 MurmurHash2/3 多种变体与分布性测试。 |
| test/case/log_formatter_test.cpp | 新增 log_formatter 格式化符号与边界输入测试。 |
| test/case/ini_loader_test.cpp | 为 ini_value 增补基础/路径/类型转换/时长解析测试。 |
| test/case/file_system_test.cpp | 增补路径拆分、绝对路径判断、重命名、非存在文件等测试。 |
| ci/do_ci.sh | 覆盖率任务生成 coverage-full.info 并过滤 sample/test/tools/third_party 后输出 coverage.info。 |
Comment on lines
+228
to
+234
| CASE_TEST(ini_loader, ini_value_as_float_types) { | ||
| atfw::util::config::ini_value val; | ||
| val.add("3.14"); | ||
|
|
||
| CASE_EXPECT_LE(std::abs(3.14f - val.as_float()), 0.01f); | ||
| CASE_EXPECT_LE(std::abs(3.14 - val.as_double()), 0.01); | ||
| } |
Comment on lines
+196
to
+201
| CASE_EXPECT_FALSE(atfw::util::file_system::is_exist("/nonexistent/path/to/file.txt")); | ||
| } | ||
|
|
||
| CASE_TEST(file_system, file_size_nonexistent) { | ||
| size_t sz = 0; | ||
| CASE_EXPECT_FALSE(atfw::util::file_system::file_size("/nonexistent/path/to/file.txt", sz)); |
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.
No description provided.