You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ctest: Figure out a way to test anonymous structs/unions #4650
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 #4610 (comment) but I don't think we actually need that tricky regex pattern.
Activity
mbyx commentedon Aug 13, 2025
Could you explain a bit about what it means to "inline" the tests? Marking anonymous structs isn't too difficult.
tgross35 commentedon Aug 13, 2025
That was a bad way to describe how to treat it in tests. So for:
I think we can basically generate tests as if it was instead:
But only for what is passed to the test template, that kind of definition isn't actually accurate because of alignment.
This isn't high priority btw, just an enhancement over old ctest