100-days-of-rust/Week-02/Day-10_Unique-Binary-Search-Trees/day10/tests/example.rs

15 lines
295 B
Rust
Raw Normal View History

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);
}
}