test: add test coverage - #6
Merged
Merged
Conversation
Add inline coverage for byte-unit parsing, memory range validation, duplicate priorities, and Rust symbol mangling prefix detection. The existing cargo test --locked CI jobs discover these tests on Linux and Windows. Assisted-by: GitHub Copilot:gpt-5.3-codex
Update expectations for the case-insensitive unit suffix parsing added on latest main. Cover lowercase K, M, and G suffixes as valid input. Assisted-by: GitHub Copilot:gpt-5.3-codex
Cover assignment priorities, linker script generation, and symbol classification behavior. Add a test-only dependency-tree constructor for focused fixtures. Assisted-by: GitHub Copilot
jerrysxie
marked this pull request as ready for review
August 20, 2026 19:49
jerrysxie
requested review from
Guacimo,
felipebalbi,
kat-perez,
maxperga-msft,
philgweber and
williampMSFT
and
a lite review from Copilot
August 20, 2026 19:49
felipebalbi
approved these changes
Aug 20, 2026
felipebalbi
left a comment
There was a problem hiding this comment.
Really good, I suggest adding proptest s a dev-dep and letting it generate random examples.
There was a problem hiding this comment.
Pull request overview
This PR increases unit test coverage across CratePlace’s core logic (validation/mangling detection, linker-script generation, config parsing/validation, and dependency assignment) and adds a small test-only constructor to simplify building DepTree fixtures.
Changes:
- Add new unit tests for crate-name extraction and symbol classification in
validation. - Add unit tests for mangling prefix detection and linker-script generation output/patterns.
- Add unit tests for
ByteUnitparsing and config-range validation, plus assignment behavior tests. - Introduce
DepTree::from_cratesbehind#[cfg(test)]to constructDepTreein unit tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/validation.rs | Adds unit tests for crate-name extraction and Rust symbol classification edge cases. |
| src/mangling.rs | Adds unit tests for recognizing/rejecting mangling prefixes. |
| src/generation.rs | Adds unit tests for section name normalization, mangling match generation, and script output content. |
| src/deps.rs | Adds a #[cfg(test)] helper constructor used by unit tests to build DepTree fixtures. |
| src/config.rs | Adds unit tests for ByteUnit parsing and config validation behaviors (overlap, overflow, priorities). |
| src/assignment.rs | Adds unit tests covering error cases and assignment/defaulting behavior across dependency graphs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kurtjd
approved these changes
Aug 20, 2026
philgweber
approved these changes
Aug 20, 2026
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.
Add unit test coverage
Test report with grcov:
Total coverage: 27.27%