ctest: Figure out a way to test anonymous structs/unions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 69
Description
We should provide a cfg way to identify a union or struct field as anonymous. This can probably be a is_field_anonymous function that would make ctest "inline" the relevant tests.
This discussion was started at https://github.com/rust-lang/libc/pull/4610#discussion_r2272226633 but I don't think we actually need that tricky regex pattern.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ctest-related discussion in issue #4650 and the linked pull request discussion. Determine how anonymous struct and union fields should be identified through cfg, and define how ctest should inline the relevant tests. Done means the approach is implemented and anonymous-field tests are exercised without relying on the rejected tricky regex pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100