Added unit test
This commit is contained in:
parent
f4dc969f8f
commit
18f5b07c29
1 changed files with 10 additions and 0 deletions
|
@ -85,4 +85,14 @@ pub fn run() {
|
||||||
let total_distance: i32 = distances.iter().sum();
|
let total_distance: i32 = distances.iter().sum();
|
||||||
|
|
||||||
println!("Total distance between the lists in Day 01: {}", total_distance);
|
println!("Total distance between the lists in Day 01: {}", total_distance);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod day_01_tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_day_01() {
|
||||||
|
run();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue