From c529a96f308015f0dc8c4184b458ca29541c4e2e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 3 Dec 2024 10:09:20 -0600 Subject: [PATCH] Add test case for second part --- 2024/rust/src/day3.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/2024/rust/src/day3.rs b/2024/rust/src/day3.rs index d457bf7..8bad0a2 100644 --- a/2024/rust/src/day3.rs +++ b/2024/rust/src/day3.rs @@ -119,6 +119,12 @@ mod tests { assert_eq!( sum_muls("xmul(2,4)%&mul[3,7]!@^do_not_mul(5,5)+mul(32,64]then(mul(11,8)mul(8,5))"), 161 - ) + ); + assert_eq!( + sum_muls_with_do_and_dont( + "xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5))" + ), + 48 + ); } }