Skip to content

Enhance test coverage for config and dependency tree features - #7

Merged
jerrysxie merged 3 commits into
OpenDevicePartnership:mainfrom
jerrysxie:add-more-test-coverage
Aug 21, 2026
Merged

Enhance test coverage for config and dependency tree features#7
jerrysxie merged 3 commits into
OpenDevicePartnership:mainfrom
jerrysxie:add-more-test-coverage

Conversation

@jerrysxie

Copy link
Copy Markdown
Contributor
file coverage covered missed_lines
src/assignment.rs 99.12% 225 / 227 32, 81
src/config.rs 93.11% 568 / 610 96-98, 117-125, 228, 311-314, 354, 369, 408, 412, 438, 477-482, 513-518, 560, 570-575, 605-612
src/deps.rs 99.44% 355 / 357 216, 236
src/file_error.rs 50.00% 6 / 12 28-30, 35-37
src/generation.rs 97.24% 211 / 217 83, 101, 104, 110, 133, 156
src/init.rs 0.00% 0 / 290 38-463
src/lib.rs 0.00% 0 / 379 115-600
src/main.rs 0.00% 0 / 238 82-584
src/mangling.rs 25.35% 18 / 71 38-99
src/validation.rs 21.58% 101 / 468 92-142, 156-167, 173-281, 296, 307, 318, 348-351, 355-369, 377-738

Total coverage: 51.73%

Cover byte-unit formats, configuration validation, and persisted
configuration mutations through the public config API.

Assisted-by: GitHub Copilot:GPT-5.3 Codex
Exercise Cargo metadata discovery and dependency tree formatting,
including filtering, deduplication, and inverted traversal.

Assisted-by: GitHub Copilot:GPT-5.3 Codex
Make dependency tree tests distinguish filtering, deduplication, and
inverted traversal behavior. Verify persisted config field values and
duplicate crate and symbol errors.

Assisted-by: GitHub Copilot:GPT-5.3 Codex

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases automated test coverage around CratePlace’s configuration handling and dependency-tree formatting/behavior, helping catch regressions in parsing/validation and DepTree display options.

Changes:

  • Added unit tests for DepTree behaviors: dependency discovery, selection/removal by name, formatting options (dedupe/unspecified), inversion, and formatting error handling.
  • Added unit tests for Config covering ByteUnit formatting/serde behavior, configuration validation failures, and on-disk persistence for config mutation helpers (add_*/remove_*/set_ram).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/deps.rs Adds a comprehensive DepTree test module covering metadata-driven discovery and display behaviors/options.
src/config.rs Adds tests for ByteUnit formatting/serde, config validation edge cases, and persistence of config mutation operations via temporary files.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jerrysxie
jerrysxie marked this pull request as ready for review August 21, 2026 19:35
@jerrysxie
jerrysxie requested a review from a team as a code owner August 21, 2026 19:35

@felipebalbi felipebalbi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really, some proptest would be great here. Looks good though.

@jerrysxie

jerrysxie commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Really, some proptest would be great here. Looks good though.

I have not used proptest. It seems like it is some fuzz input generator for unit tests. I will experiment with it. For config and deps, it probably makes sense to test more cases. Not sure how easy would it be specify the rules for input generation.

@jerrysxie
jerrysxie merged commit fdf9039 into OpenDevicePartnership:main Aug 21, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this to Done in EC Aug 21, 2026
@jerrysxie
jerrysxie deleted the add-more-test-coverage branch August 21, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants