Add day1 test
This commit is contained in:
parent
e887e789d4
commit
d923633a58
10
src/day01.rs
10
src/day01.rs
|
@ -78,3 +78,13 @@ fn parse_digit(s: &str) -> u32 {
|
|||
_ => s.parse().unwrap(),
|
||||
}
|
||||
}
|
||||
|
||||
mod tests {
|
||||
use super::find_digits_part2;
|
||||
|
||||
#[test]
|
||||
fn twone() {
|
||||
assert_eq!(find_digits_part2("twone"), 21);
|
||||
assert_eq!(find_digits_part2("8oneightakljsdf"), 88);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue