Skip to content

Commit

Permalink
test(matrix): check Matrix::neighbours() for more invalid cells
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Aug 4, 2024
1 parent 03f020c commit d631297
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ fn empty_neighbours() {
let m = Matrix::new(10, 10, 42);
assert_eq!(m.neighbours((10, 10), false).collect::<Vec<_>>(), vec![]);
assert_eq!(m.neighbours((10, 10), true).collect::<Vec<_>>(), vec![]);
assert_eq!(m.neighbours((5, 10), false).collect::<Vec<_>>(), vec![]);
assert_eq!(m.neighbours((5, 10), true).collect::<Vec<_>>(), vec![]);
assert_eq!(m.neighbours((10, 5), false).collect::<Vec<_>>(), vec![]);
assert_eq!(m.neighbours((10, 5), true).collect::<Vec<_>>(), vec![]);
}

#[test]
Expand Down

0 comments on commit d631297

Please sign in to comment.