100-days-of-rust/Week-02/Day-09_Trapping-Rain-Water/day9/tests/exaples.rs
2024-08-03 14:57:17 +02:00

12 lines
194 B
Rust

use day9::trap;
#[test]
fn exaple1() {
assert_eq!(trap([0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1].to_vec()), 6);
}
#[test]
fn exaple2() {
assert_eq!(trap([4, 2, 0, 3, 2, 5].to_vec()), 9);
}