100-days-of-rust/Week-04/Day-27_Task-Scheduler/day27/tests/examples.rs

26 lines
514 B
Rust
Raw Normal View History

2024-08-21 20:02:19 +00:00
#[cfg(test)]
mod examples {
use day27::task_scheduler;
#[test]
fn example1() {
assert_eq!(task_scheduler(&['A', 'A', 'A', 'B', 'B', 'B'], 2), 8);
}
#[test]
fn example2() {
assert_eq!(task_scheduler(&['A', 'A', 'A', 'B', 'B', 'B'], 0), 6);
}
#[test]
fn example3() {
assert_eq!(
task_scheduler(
&['A', 'A', 'A', 'A', 'A', 'A', 'B', 'C', 'D', 'E', 'F', 'G'],
2
),
16
);
}
}