Skip to content

Commit

Permalink
Drop other mutations of && and ||
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Jan 1, 2024
1 parent 53fb59a commit 796cfb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- New: Mutate `+, -, *, /, %, &, ^, |, <<, >>` binary ops, and their corresponding assignment ops like `+=`.

- Changed: Stop generating mutations of `||` to `!=`, because it seems to raise too many low-value false positives, where the program does not need to care about the case where both operands are true.
- Changed: Stop generating mutations of `||` and `&&` to `!=` and `||`, because it seems to raise too many low-value false positives that may be hard to test.

## 23.12.1

Expand Down
4 changes: 2 additions & 2 deletions src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ impl<'ast> Visit<'ast> for DiscoveryVisitor<'_> {
// because they require parenthesis for disambiguation in many expressions.
BinOp::Eq(_) => vec![quote! { != }],
BinOp::Ne(_) => vec![quote! { == }],
BinOp::And(_) => vec![quote! { || }, quote! {!=}],
BinOp::Or(_) => vec![quote! { && }, quote! {==}],
BinOp::And(_) => vec![quote! { || }],
BinOp::Or(_) => vec![quote! { && }],
BinOp::Lt(_) => vec![quote! { == }, quote! {>}],
BinOp::Gt(_) => vec![quote! { == }, quote! {<}],
BinOp::Le(_) => vec![quote! {>}],
Expand Down

0 comments on commit 796cfb6

Please sign in to comment.