eigerco / move-spec-testing

Other
0 stars 1 forks source link

chore(mutator): improve binary replace operator #29

Closed Rqnsom closed 1 week ago

Rqnsom commented 3 weeks ago

To avoid false-positive results with move-spec-test and move-mutation-test, the binary replacement operator has been improved with the following rules:

x == 0 should never mutate to x <= 0
0 == x should never mutate to 0 => x
The reverse is not checked: x <= 0 or 0 >= 0 since such code indicates logic error.

x != 0 should never mutate to x > 0
0 != x should never mutate to 0 < x
x > 0 should never mutate to x != 0
0 < x should never mutate to 0 != x