Skip to content

feat(instrumenter): add BitwiseOperator mutator#6088

Open
baer wants to merge 1 commit into
stryker-mutator:masterfrom
baer:feat/bitwise-operator-mutator
Open

feat(instrumenter): add BitwiseOperator mutator#6088
baer wants to merge 1 commit into
stryker-mutator:masterfrom
baer:feat/bitwise-operator-mutator

Conversation

@baer

@baer baer commented Jul 2, 2026

Copy link
Copy Markdown

Adds a BitwiseOperator mutator for the binary bitwise operators, which PIT and Stryker.NET already mutate but StrykerJS did not:

  • &|
  • <<>>
  • ^&
  • >>>>>

Mappings follow the existing AssignmentOperator style (one target per operator). This PR also adds the two bitwise compound-assignment operators that AssignmentOperator was missing: ^=&= and >>>=>>=.

Adds a new BitwiseOperator mutator that handles binary bitwise
expressions (BinaryExpression nodes): & → |, | → &, ^ → &,
<< → >>, >> → <<, >>> → >>.

Also completes the bitwise assignment operator coverage in
AssignmentOperator by adding the two previously missing entries:
^= → &= and >>>= → >>=.

Updates the benchmark-big.ts perf test expected mutant count from
933 to 946 (+13), accounting for 12 new binary bitwise mutants and
1 new ^= assignment mutant introduced in that fixture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant