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
xUnit migration reverses ProperSubset and ProperSuperset operands and loses strictness #7431
The xUnit migration code fix reverses the meaning of Assert.ProperSubset and Assert.ProperSuperset: it asserts against the expected set instead of the actual set. Passing tests can fail after migration. It also replaces strict set comparisons with non-strict comparisons even though TUnit already provides proper-subset and proper-superset assertions.
The generated assertions are Assert.That(superset).IsSubsetOf(subset) and Assert.That(subset).IsSupersetOf(superset), both of which fail.
Expected and actual
The migrated assertions should be Assert.That(subset).IsProperSubsetOf(superset) and Assert.That(superset).IsProperSupersetOf(subset). The actual output reverses the operands and adds a manual-conversion TODO instead of preserving strictness.
Evidence at commit d8badacb13f208819d39867ea384b9cdb746bfa4:
Audited against main d87516cb9c: ConvertProperSubset and ConvertProperSuperset still use the first operand as the assertion subject and emit non-strict comparisons plus TODOs (lines 729–754). The issue and acceptance criteria remain current; no closing PR was found.
Activity
thomhurst commentedon Nov 3, 2026
Audited against main
d87516cb9c:ConvertProperSubsetandConvertProperSupersetstill use the first operand as the assertion subject and emit non-strict comparisons plus TODOs (lines 729–754). The issue and acceptance criteria remain current; no closing PR was found.fix: preserve proper-set argument evaluation order (#7431)
fix: preserve actual set comparer in migrations (#7431)
fix: preserve proper-set parameter types during migration (#7431)
Fix xUnit proper-set migration operands and strictness (#7653)