cargo-mutants 27.0.0

Inject bugs and see if your tests catch them
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Example of code with strict warnings that might fail to compile.

#![forbid(unused)]

pub fn some_fn(a: usize) -> usize {
    a + 2
}

#[cfg(test)]
mod test {
    #[test]
    fn test_some_fn() {
        assert_eq!(super::some_fn(10), 12);
    }
}