test(day01): split apart tests and name better

This commit is contained in:
swaits committed 2023-12-02 15:11:23 -07:00
1 parent 34af78c853
commit f770e499d1
1 file changed
+10 -2
+10 -2
View File
@@ -70,16 +70,24 @@ mod tests {
use super::*;
#[test]
fn test_day01_part1() {
fn test_part1_example() {
let input = "1abc2\npqr3stu8vwx\na1b2c3d4e5f\ntreb7uchet";
assert_eq!(day01_part1(input), 142);
}
#[test]
fn test_part1_actual() {
assert_eq!(day01_part1(INPUT), 54597);
}
#[test]
fn test_day01_part2() {
fn test_part2_example() {
let input="two1nine\neightwothree\nabcone2threexyz\nxtwone3four\n4nineeightseven2\nzoneight234\n7pqrstsixteen";
assert_eq!(day01_part2(input), 281);
}
#[test]
fn test_part2_actual() {
assert_eq!(day01_part2(INPUT), 54504);
}
}