100-days-of-rust/Week-02/Day-09_Trapping-Rain-Water/day9/tests/exaples.rs

12 lines
194 B
Rust
Raw Permalink Normal View History

2024-08-03 12:57:17 +00:00
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);
}