summaryrefslogtreecommitdiffstats
path: root/src/2021/21/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/2021/21/mod.rs')
-rw-r--r--src/2021/21/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/2021/21/mod.rs b/src/2021/21/mod.rs
index b8c6be9..beff797 100644
--- a/src/2021/21/mod.rs
+++ b/src/2021/21/mod.rs
@@ -199,3 +199,15 @@ pub fn part2(game: Game) -> anyhow::Result<i64> {
let (p1, p2) = game.run_dirac(true);
Ok(p1.max(p2))
}
+
+#[test]
+fn test() {
+ assert_eq!(
+ part1(parse(crate::util::data(2021, 21).unwrap()).unwrap()).unwrap(),
+ 1004670
+ );
+ assert_eq!(
+ part2(parse(crate::util::data(2021, 21).unwrap()).unwrap()).unwrap(),
+ 492043106122795
+ );
+}