pub enum Operator {
ArithmeticOperator,
RelationalOperator,
LogicalOperator,
NegateCondition,
UnaryOperator,
UpdateOperator,
RemovedCall,
ReturnValue,
BooleanLiteral,
StringLiteral,
OptionalChaining,
}Expand description
One mutation operator.
The set comes from selective-mutation research: it keeps the operators that give most of the test-strength signal and drops redundant ones.
Variants§
ArithmeticOperator
+ and - swap, * and / swap, % becomes *, += and -= swap.
RelationalOperator
The non-redundant relational subset (Kaminski).
LogicalOperator
&& and || swap, ?? becomes &&.
NegateCondition
A plain condition becomes true and false.
UnaryOperator
!x and -x become x.
UpdateOperator
++ and -- swap.
RemovedCall
A call statement becomes a no-op.
ReturnValue
return expr becomes return undefined.
BooleanLiteral
true and false swap.
StringLiteral
A non-empty string becomes empty, an empty string becomes "fallow".
OptionalChaining
a?.b becomes a.b, a?.() becomes a().
Implementations§
Trait Implementations§
impl Copy for Operator
impl Eq for Operator
Source§impl Ord for Operator
impl Ord for Operator
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Operator
impl PartialOrd for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more