cargo-mutants 23.6.0
An exciting release that adds a lot more power to generate viable mutations of functions returning more complex types.
-
Generate
Box::leak(Box::new(...))
as a mutation of functions returning&mut
. -
Add a concept of mutant "genre", which is included in the json listing of mutants. The only genre today is
FnValue
, in which a function body is replaced by a value. This will in future allow filtering by genre. -
Recurse into return types, so that for example
Result<bool>
can generateOk(true)
andOk(false)
, andSome<T>
generatesNone
and every generated value ofT
. Similarly forBox<T>
, andVec<T>
. -
Generate specific values for integers:
[0, 1]
for unsigned integers,[0, 1, -1]
for signed integers;[1]
for NonZero unsigned integers and[1, -1]
for NonZero signed integers. -
Generate specific values for floats:
[0.0, 1.0, -1.0]
. -
Generate (fixed-length) array values, like
[0; 256], [1; 256]
using every recursively generated value for the element type.