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
Add struct field deletion mutations for literals with base expressions (#558)
- [x] Add new Genre variant for struct field deletion mutations
- [x] Implement visit_expr_struct method to detect struct literals with
base (default) expressions
- [x] Generate mutants that delete individual fields from struct
literals with defaults
- [x] Add unit tests in visit.rs to verify struct field deletion
- [x] Update documentation in book and NEWS.md
- [x] Fix trailing comma handling to generate valid Rust code
- [x] Include struct type and function name in mutant descriptions
- [x] Refactor to use MutationTarget enum instead of string parsing
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Martin Pool <mbp@sourcefrog.net>
Copy file name to clipboardExpand all lines: NEWS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@
14
14
15
15
- New: `start_time` and `end_time` fields in `outcomes.json`.
16
16
17
+
- New: Delete individual fields from struct literals that have a base (default) expression like `..Default::default()` or `..base_value`. This checks that tests verify each field is set correctly and not just relying on default values.
18
+
17
19
- New: `cargo_mutants_version` field in `outcomes.json`.
18
20
19
21
- Changed: Functions with attributes whose path ends with `test` are now skipped, not just those with the plain `#[test]` attribute. This means functions with `#[tokio::test]`, `#[sqlx::test]`, and similar testing framework attributes are automatically excluded from mutation testing.
0 commit comments