Changed number on day 3

This commit is contained in:
Luke Else 2023-12-02 12:46:10 +00:00
parent 13a891400a
commit cb4b54e130

View File

@ -18,41 +18,48 @@ impl Solution for Day03 {
} }
fn get_day(&self) -> u8 { fn get_day(&self) -> u8 {
2 3
} }
} }
impl Day03 { impl Day03 {}
}
/// Test from puzzle input /// Test from puzzle input
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use crate::*;
use super::*; use super::*;
use crate::*;
#[test] #[test]
fn part1() { fn part1() {
let challenge = day03::Day03{}; let challenge = day03::Day03 {};
//Complete the Challenge //Complete the Challenge
let answer = challenge.part1( let answer = challenge
get_input(challenge.get_day(), utils::InputType::Test1).unwrap().as_mut() .part1(
).unwrap().to_string(); get_input(challenge.get_day(), utils::InputType::Test1)
.unwrap()
.as_mut(),
)
.unwrap()
.to_string();
assert_eq!(answer, "Ready"); assert_eq!(answer, "Ready");
} }
#[test] #[test]
fn part2() { fn part2() {
let challenge = day03::Day03{}; let challenge = day03::Day03 {};
//Complete the Challenge //Complete the Challenge
let answer = challenge.part2( let answer = challenge
get_input(challenge.get_day(), utils::InputType::Test2).unwrap().as_mut() .part2(
).unwrap().to_string(); get_input(challenge.get_day(), utils::InputType::Test2)
.unwrap()
.as_mut(),
)
.unwrap()
.to_string();
assert_eq!(answer, "Ready"); assert_eq!(answer, "Ready");
} }