15 lines
295 B
Rust
15 lines
295 B
Rust
use day10::catalan_number;
|
|
|
|
#[test]
|
|
fn example() {
|
|
assert_eq!(catalan_number(3), 5);
|
|
}
|
|
|
|
#[test]
|
|
fn examplu() {
|
|
let array = [1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786];
|
|
for (i, a) in array.into_iter().enumerate() {
|
|
assert_eq!(catalan_number(i as u8), a);
|
|
}
|
|
}
|