diff options
Diffstat (limited to 'src/2021/20/mod.rs')
-rw-r--r-- | src/2021/20/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/2021/20/mod.rs b/src/2021/20/mod.rs index a46acab..2905880 100644 --- a/src/2021/20/mod.rs +++ b/src/2021/20/mod.rs @@ -94,3 +94,15 @@ pub fn part2(mut image: Image) -> anyhow::Result<i64> { } Ok(image.count_true()) } + +#[test] +fn test() { + assert_eq!( + part1(parse(crate::util::data(2021, 20).unwrap()).unwrap()).unwrap(), + 5306 + ); + assert_eq!( + part2(parse(crate::util::data(2021, 20).unwrap()).unwrap()).unwrap(), + 17497 + ); +} |