mutagen
mutagen copied to clipboard
Document mutations
We should have some document that outlines which mutations are actually there and what they do to the code.
What does "insert opportunistic return default() - RETURN_DEFAULT" do? My function is fn parse_something(value: &str) -> Result<(u16, u16), Error>
It adds code to directly return a default value if your functions return type implements Default
. Otherwise it's a no-op.
It adds code to directly return a default value if your functions return type implements Default.
That's weird, if I change my function to return Ok((Default::default(), Default::default()))
my unit test will catch the error but cargo mutagen still say insert opportunistic return default() - RETURN_DEFAULT src/main.rs:276:62: 286:2 (1) ... FAILED
(if I restore my function).
Otherwise it's a co-op.
Pardon my ignorance but what does co-op mean in this context?
Stupid autocorrect: I meant a no-op. Edited my comment.
Is there something beyond https://github.com/llogiq/mutagen/blob/master/docs/mutators.md that would be required for this issue?
This document certainly describes every mutation currently implemented. I am not too happy with the format displayed in the documentation. Other than that, this issue can be closed.