100-days-of-rust/Week-05/Day-32_Climbing-The-Leaderboard/day32/tests/examples.rs

21 lines
382 B
Rust
Raw Normal View History

2024-08-26 10:59:39 +00:00
#[cfg(test)]
mod examples {
use day32::climb_leaderboard;
#[test]
fn example1() {
assert_eq!(
climb_leaderboard(&[100, 90, 90, 80], &[70, 80, 105]),
[4, 3, 1]
)
}
#[test]
fn example2() {
assert_eq!(
climb_leaderboard(&[100, 90, 90, 80], &[106, 107, 105]),
[1, 1, 1]
)
}
}