~joshleeb/euler

5afad69194ac592fb3e63098d6164823ba9d31bc — Josh Leeb-du Toit 9 months ago b396177
Add missing test to problem 4
1 files changed, 12 insertions(+), 0 deletions(-)

M src/p004.rs
M src/p004.rs => src/p004.rs +12 -0
@@ 45,3 45,15 @@ fn is_palindrome<T: Into<Digits>>(n: T) -> bool {
    }
    digits.nth(0) == digits.nth(digits.len() - 1)
}

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

    const SOLUTION: u32 = 906609;

    #[test]
    fn solution() {
        assert_eq!(Problem::default().solve(), SOLUTION)
    }
}