[TASK] Day 4 + performance improvements

This commit is contained in:
2023-12-04 23:34:23 +01:00
parent 9ebb5c851a
commit ead47e232e
16 changed files with 385 additions and 38 deletions

View File

@@ -7,7 +7,7 @@ pub struct DayX {
impl DayX {
pub fn create() -> Self {
pub fn create(input_filename: String) -> Self {
let lines = util::read_file("input/dayX_example.txt");
// let lines = util::read_file("input/dayX.txt");
@@ -27,3 +27,15 @@ impl DaySolver for DayX {
return 0.to_string();
}
}
#[test]
fn test_part1() {
let mut day = DayX::create("input/dayX_example.txt".to_string());
assert_eq!("4361", day.solve_part1());
}
#[test]
fn test_part2() {
let mut day = DayX::create("input/dayX_example.txt".to_string());
assert_eq!("467835", day.solve_part2());
}