100-days-of-rust/Week-04/Day-24_The-Josephus-Problem/day24/tests/examples.rs

25 lines
374 B
Rust
Raw Normal View History

2024-08-18 14:56:39 +00:00
#[cfg(test)]
mod examples {
use day24::josephus;
#[test]
fn example1() {
assert_eq!(josephus(41, 3), 31);
}
#[test]
fn example2() {
assert_eq!(josephus(35, 11), 18);
}
#[test]
fn example3() {
assert_eq!(josephus(11, 1), 11);
}
#[test]
fn example4() {
assert_eq!(josephus(2, 2), 1);
}
}