25 lines
389 B
Rust
25 lines
389 B
Rust
#[cfg(test)]
|
|
mod examples {
|
|
use day18::unique_paths;
|
|
|
|
#[test]
|
|
fn example1() {
|
|
assert_eq!(unique_paths(3, 7), 28);
|
|
}
|
|
|
|
#[test]
|
|
fn example2() {
|
|
assert_eq!(unique_paths(3, 2), 3);
|
|
}
|
|
|
|
#[test]
|
|
fn example3() {
|
|
assert_eq!(unique_paths(7, 3), 28);
|
|
}
|
|
|
|
#[test]
|
|
fn example4() {
|
|
assert_eq!(unique_paths(3, 3), 6);
|
|
}
|
|
}
|