Some more cleanup and fixup to get everything started

This commit is contained in:
Dreaded_X 2022-12-02 19:35:55 +01:00
parent a52cdafb8a
commit a7d34c078d
Signed by: Dreaded_X
GPG Key ID: 76BDEC4E165D8AD9
3 changed files with 21 additions and 13 deletions

View File

@ -1,5 +1,3 @@
24000
45000
1000
2000
3000

View File

@ -1,23 +1,32 @@
// -- Setup & Runners --
use aoc::Solver;
pub struct Day {}
pub struct Day;
fn main() {
Day::solve();
}
#[test]
fn part1() {
fn part1_test1() {
Day::test(aoc::Part::ONE, "test-1", 24000);
}
#[test]
fn part2() {
fn part2_test1() {
Day::test(aoc::Part::TWO, "test-1", 45000);
}
#[test]
fn part1_solution() {
Day::test(aoc::Part::ONE, "input", 70116);
}
#[test]
fn part2_solution() {
Day::test(aoc::Part::TWO, "input", 206582);
}
// -- Solution --
impl aoc::Solver for Day {
fn day() -> u8 {
1
}
fn part1(input: &str) -> u32 {
input.split("\n\n")
.map(|elf| elf.split("\n")

View File

@ -1,24 +1,25 @@
// -- Setup & Runners --
use aoc::Solver;
pub struct Day {}
pub struct Day;
fn main() {
Day::solve();
}
#[test]
fn part1() {
fn part1_test1() {
Day::test(aoc::Part::ONE, "test-1", 0);
}
// -- Solution --
impl aoc::Solver for Day {
fn day() -> u8 {
0
}
fn part1(input: &str) -> u32 {
input.len() as u32
0
}
fn part2(input: &str) -> u32 {
input.len() as u32
0
}
}