mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 07:03:19 -09:00
fix tests
This commit is contained in:
parent
3156379178
commit
2ab1f41efe
21
src/day1.rs
21
src/day1.rs
@ -11,12 +11,29 @@ mod part1 {
|
||||
#[test]
|
||||
fn run_sample() {
|
||||
let input = include_str!("../inputs/1_test.txt");
|
||||
assert_eq!(part_1_solution(input), 0);
|
||||
assert_eq!(part_1_solution(input), 7);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run() {
|
||||
let input = include_str!("../inputs/1.txt");
|
||||
assert_eq!(part_1_solution(input), 0);
|
||||
assert_eq!(part_1_solution(input), 1139);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod part2 {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn run_sample() {
|
||||
let input = include_str!("../inputs/1_test.txt");
|
||||
assert_eq!(part_2_solution(input), 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run() {
|
||||
let input = include_str!("../inputs/1.txt");
|
||||
assert_eq!(part_2_solution(input), 1103);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user