Skip to content

Mutation Operators

OperatorDescription
cxx_add_assign_to_sub_assignReplaces += with -=
cxx_add_to_subReplaces + with -
cxx_and_assign_to_or_assignReplaces &= with |=
cxx_and_to_orReplaces & with |
cxx_assign_constReplaces ‘a = b’ with ‘a = 42’
cxx_bitwise_not_to_noopReplaces ~x with x
cxx_div_assign_to_mul_assignReplaces /= with *=
cxx_div_to_mulReplaces / with *
cxx_eq_to_neReplaces == with !=
cxx_ge_to_gtReplaces >= with >
cxx_ge_to_ltReplaces >= with <
cxx_gt_to_geReplaces > with >=
cxx_gt_to_leReplaces > with <=
cxx_init_constReplaces ‘T a = b’ with ‘T a = 42’
cxx_le_to_gtReplaces <= with >
cxx_le_to_ltReplaces <= with <
cxx_lshift_assign_to_rshift_assignReplaces <<= with >>=
cxx_lshift_to_rshiftReplaces << with >>
cxx_lt_to_geReplaces < with >=
cxx_lt_to_leReplaces < with <=
cxx_minus_to_noopReplaces -x with x
cxx_mul_assign_to_div_assignReplaces *= with /=
cxx_mul_to_divReplaces * with /
cxx_ne_to_eqReplaces != with ==
cxx_or_assign_to_and_assignReplaces |= with &=
cxx_or_to_andReplaces | with &
cxx_post_dec_to_post_incReplaces x— with x++
cxx_post_inc_to_post_decReplaces x++ with x—
cxx_pre_dec_to_pre_incReplaces —x with ++x
cxx_pre_inc_to_pre_decReplaces ++x with —x
cxx_rem_assign_to_div_assignReplaces %= with /=
cxx_rem_to_divReplaces % with /
cxx_remove_negationReplaces !a with a
cxx_remove_void_callRemoves calls to a function returning void
cxx_replace_scalar_callReplaces call to a function with 42
cxx_rshift_assign_to_lshift_assignReplaces >>= with <<=
cxx_rshift_to_lshiftReplaces << with >>
cxx_sub_assign_to_add_assignReplaces -= with +=
cxx_sub_to_addReplaces - with +
cxx_xor_assign_to_or_assignReplaces ^= with |=
cxx_xor_to_orReplaces ^ with |
negate_mutatorNegates conditionals !x to x and x to !x
GroupMembers
cxx_allcxx_assignment, cxx_increment, cxx_decrement, cxx_arithmetic, cxx_comparison, cxx_boundary, cxx_bitwise, cxx_calls
cxx_arithmeticcxx_minus_to_noop, cxx_add_to_sub, cxx_sub_to_add, cxx_mul_to_div, cxx_div_to_mul, cxx_rem_to_div
cxx_arithmetic_assignmentcxx_add_assign_to_sub_assign, cxx_sub_assign_to_add_assign, cxx_mul_assign_to_div_assign, cxx_div_assign_to_mul_assign, cxx_rem_assign_to_div_assign
cxx_assignmentcxx_bitwise_assignment, cxx_arithmetic_assignment, cxx_const_assignment
cxx_bitwisecxx_bitwise_not_to_noop, cxx_and_to_or, cxx_or_to_and, cxx_xor_to_or, cxx_lshift_to_rshift, cxx_rshift_to_lshift
cxx_bitwise_assignmentcxx_and_assign_to_or_assign, cxx_or_assign_to_and_assign, cxx_xor_assign_to_or_assign, cxx_lshift_assign_to_rshift_assign, cxx_rshift_assign_to_lshift_assign
cxx_boundarycxx_le_to_lt, cxx_lt_to_le, cxx_ge_to_gt, cxx_gt_to_ge
cxx_callscxx_remove_void_call, cxx_replace_scalar_call
cxx_comparisoncxx_eq_to_ne, cxx_ne_to_eq, cxx_le_to_gt, cxx_lt_to_ge, cxx_ge_to_lt, cxx_gt_to_le
cxx_const_assignmentcxx_assign_const, cxx_init_const
cxx_decrementcxx_pre_dec_to_pre_inc, cxx_post_dec_to_post_inc
cxx_defaultcxx_increment, cxx_arithmetic, cxx_comparison, cxx_boundary
cxx_incrementcxx_pre_inc_to_pre_dec, cxx_post_inc_to_post_dec
cxx_logicalcxx_remove_negation
experimentalnegate_mutator, cxx_logical