From d710c92a72ec8b9ea9c4d1fa5609cf3665eb68ac Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 7 Jul 2024 16:33:17 +0200 Subject: [PATCH] day(20): fix tests Only one part has a test case. Signed-off-by: Matej Focko --- src/bin/day20.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/bin/day20.rs b/src/bin/day20.rs index dc97d89..7949174 100644 --- a/src/bin/day20.rs +++ b/src/bin/day20.rs @@ -224,4 +224,14 @@ fn main() -> Result<()> { Day20::main() } -test_sample!(day_20, Day20, 11687500, 0); +#[cfg(test)] +mod day_20 { + use super::*; + + #[test] + fn part_1() { + let path = Day20::get_sample(1); + let mut day = Day20::new(path); + assert_eq!(day.part_1(), 11687500); + } +}