25 lines
424 B
Rust
25 lines
424 B
Rust
|
use day17::freed_prisoners;
|
||
|
|
||
|
#[test]
|
||
|
fn example1() {
|
||
|
assert_eq!(
|
||
|
freed_prisoners(&[true, true, false, false, false, true, false]),
|
||
|
4
|
||
|
);
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example2() {
|
||
|
assert_eq!(freed_prisoners(&[true, true, true]), 1);
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example3() {
|
||
|
assert_eq!(freed_prisoners(&[false, false, false]), 0);
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example4() {
|
||
|
assert_eq!(freed_prisoners(&[false, true, true, true]), 0);
|
||
|
}
|