This commit is contained in:
Martijn Gerritsen 2025-12-01 22:39:07 +01:00
parent 2dac973d45
commit 716e66aa01
2 changed files with 31 additions and 0 deletions

11
Cargo.toml Normal file
View File

@ -0,0 +1,11 @@
[package]
name = "aoc2025"
version = "0.1.0"
edition = "2024"
[dev-dependencies]
criterion = { version = "0.7", features = ["html_reports"] }
[[bench]]
name = "bench_aoc_1"
harness = false

20
src/main.rs Normal file
View File

@ -0,0 +1,20 @@
pub mod aoc;
use crate::aoc::*;
fn main() {
println!("answer: {}", aoc_1::solve_1_f( include_bytes!("aoc/input/full_input_aoc1.txt")));
println!("answer: {}", aoc_1::solve_2(include_bytes!("aoc/input/full_input_aoc1.txt")));
//println!("{:?}", include_bytes!("aoc/input/full_input_aoc1.txt"));
}
#[test]
fn test_aoc_1_1() {
assert_eq!(aoc_1::solve_1( include_bytes!("aoc/input/test_input_aoc1.txt")), 3);
assert_eq!(aoc_1::solve_1( include_bytes!("aoc/input/full_input_aoc1.txt")), 1195);
}
#[test]
fn test_aoc_1_2() {
assert_eq!(aoc_1::solve_2f(include_bytes!("aoc/input/test_input_aoc1.txt")), 6);
assert_eq!(aoc_1::solve_2f(include_bytes!("aoc/input/full_input_aoc1.txt")), 6770);
}