Add test case for second part

This commit is contained in:
Daniel Flanagan 2024-12-03 10:09:20 -06:00
parent 07b32d8ff8
commit c529a96f30

View file

@ -119,6 +119,12 @@ mod tests {
assert_eq!( 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))"), sum_muls("xmul(2,4)%&mul[3,7]!@^do_not_mul(5,5)+mul(32,64]then(mul(11,8)mul(8,5))"),
161 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
);
} }
} }