←back to thread

105 points todsacerdoti | 1 comments | | HN request time: 0.222s | source
1. IshKebab ◴[] No.43676082[source]
This is called mutation testing and is very common in formal silicon verification.

https://en.wikipedia.org/wiki/Mutation_testing

A downside of naively changing source code is that you have to recompile the code for every mutant, which can be very slow (especially for Rust!). Obviously the right thing to do is to decide at runtime whether to insert a bug or not for each mutation point.

I had a brief skim through the help for cargo-mutants and it looks like it takes the naive approach which is rather unfortunate.