Files
AdventOfCode2025/src/solutions/day04.rs
Luke Else d03f97e641
Some checks failed
Continuous integration / Check (push) Successful in 39s
Continuous integration / Test Suite (push) Failing after 42s
Continuous integration / Rustfmt (push) Successful in 27s
Continuous integration / Clippy (push) Successful in 39s
Continuous integration / build (push) Successful in 41s
feat: Ready for day 4, clippy has been satisfied :)
2025-12-07 21:31:33 +00:00

67 lines
1.3 KiB
Rust

use super::Solution;
pub struct Day04 {}
impl Solution for Day04 {
fn part1(
&self,
_input: &mut Vec<String>,
) -> Result<Box<dyn std::fmt::Display>, Box<dyn std::error::Error>> {
Ok(Box::new("Ready"))
}
fn part2(
&self,
_input: &mut Vec<String>,
) -> Result<Box<dyn std::fmt::Display>, Box<dyn std::error::Error>> {
Ok(Box::new("Ready"))
}
fn get_day(&self) -> u8 {
4
}
}
impl Day04 {}
/// Test from puzzle input
#[cfg(test)]
mod test {
use super::*;
use crate::*;
#[test]
fn part1() {
let challenge = day04::Day04 {};
//Complete the Challenge
let answer = challenge
.part1(
utils::get_input(challenge.get_day(), utils::InputType::Test1)
.unwrap()
.as_mut(),
)
.unwrap()
.to_string();
assert_eq!(answer, "13");
}
#[test]
fn part2() {
let challenge = day04::Day04 {};
//Complete the Challenge
let answer = challenge
.part2(
utils::get_input(challenge.get_day(), utils::InputType::Test2)
.unwrap()
.as_mut(),
)
.unwrap()
.to_string();
assert_eq!(answer, "Ready");
}
}