From 797c33b0900e3fb6588514dc314aa2a00564d30e Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Thu, 2 Dec 2021 14:44:38 +0100 Subject: [PATCH] 100% coverage for all days --- src/day01.rs | 2 +- src/day02.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/day01.rs b/src/day01.rs index 9367924..00ffc9a 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,4 +1,4 @@ -#[derive(Eq, PartialEq, Ord, PartialOrd, Clone)] + pub struct Day01(Vec); impl crate::day::Day for Day01 { diff --git a/src/day02.rs b/src/day02.rs index 74ec884..c1a5c66 100644 --- a/src/day02.rs +++ b/src/day02.rs @@ -95,4 +95,11 @@ forward 2"; let d = Day02::init(f); assert_eq!("1592426537", d.part2()) } + + #[test] + #[should_panic] + fn very_invalid_input(){ + let f = String::from("invalid 10"); + let d = Day02::init(f); + } } \ No newline at end of file