Skip to content

Commit

Permalink
test(lib): Prim struct default call
Browse files Browse the repository at this point in the history
  • Loading branch information
unrenamed committed Aug 29, 2023
1 parent 1183ce9 commit 9fd76d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/maze/algorithms/prim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,15 @@ fn direction(x: usize, y: usize, nx: usize, ny: usize) -> Option<Cell> {

unreachable!("The x and y coordinates are never equal to nx and ny")
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn default_call() {
let algo = Prim::default();
let v: Vec<Coords> = vec![];
assert_eq!(v, algo.frontiers);
}
}

0 comments on commit 9fd76d5

Please sign in to comment.