~xenrox/aoc2020

9d4696e3e4a564c4d8a0dfde42c2bde94f1ea09c — Thorben Günther 3 years ago f10f5d0
Add tests
1 files changed, 17 insertions(+), 0 deletions(-)

M src/days/day01.rs
M src/days/day01.rs => src/days/day01.rs +17 -0
@@ 33,3 33,20 @@ pub fn get_solution() {
        calc_solution2(&input)
    );
}

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

    #[test]
    fn part1() {
        let input = vec![1721, 979, 366, 299, 675, 1456];
        assert_eq!(calc_solution1(&input), 514579);
    }

    #[test]
    fn part2() {
        let input = vec![1721, 979, 366, 299, 675, 1456];
        assert_eq!(calc_solution2(&input), 241861950);
    }
}