26 lines
514 B
Rust
26 lines
514 B
Rust
|
#[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
|
||
|
);
|
||
|
}
|
||
|
}
|