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
pub fn is_even(n: u32) -> bool {
    n % 2 == 0
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn test_is_even() {
        assert!(is_even(2));
        assert!(!is_even(3));
    }
}