1
1
mirror of https://github.com/theoludwig/advent_of_code.git synced 2025-05-18 19:27:51 +02:00

test: add cases for input.txt

This commit is contained in:
2023-12-08 18:56:07 +01:00
parent 97c302d9e1
commit 755e211f3f
10 changed files with 61 additions and 56 deletions

View File

@ -35,12 +35,6 @@ In this schematic, two numbers are **not** part numbers because they are not adj
Of course, the actual engine schematic is much larger. **What is the sum of all of the part numbers in the engine schematic?**
To begin, [get your puzzle input](./input.txt).
Your puzzle answer was `553079`.
**The first half of this puzzle is complete! It provides one gold star: `*`.**
## Instructions - Part 2
The engineer finds the missing part and installs it in the engine! As the engine springs to life, you jump in the closest gondola, finally ready to ascend to the water source.
@ -71,7 +65,3 @@ Consider the same engine schematic again:
In this schematic, there are **two** gears. The first is in the top left; it has part numbers `467` and `35`, so its gear ratio is `16345`. The second gear is in the lower right; its gear ratio is `451490`. (The `*` adjacent to `617` is **not** a gear because it is only adjacent to one part number.) Adding up all of the gear ratios produces **`467835`**.
**What is the sum of all of the gear ratios in your engine schematic?**
Your puzzle answer was `84363105`.
**Both parts of this puzzle are complete! They provide two gold stars: `**`.**

View File

@ -213,4 +213,14 @@ mod day_3_tests {
fn test_part_2_example() {
assert_eq!(part_2(include_str!("../input_example_1.txt")), 467835);
}
#[test]
fn test_part_1() {
assert_eq!(part_1(include_str!("../input.txt")), 553079);
}
#[test]
fn test_part_2() {
assert_eq!(part_2(include_str!("../input.txt")), 84363105);
}
}