Skip to content

Commit

Permalink
Add tests for PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Moeller authored and becheran committed May 7, 2024
1 parent 9b1dfa9 commit 62782c0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2181,6 +2181,19 @@ mod test {
assert_eq!(grid, grid2);
}

#[test]
fn equal_partial_eq() {
let grid = grid![[1.0]];
let grid2 = Grid::from_vec(vec![1.0], 1);
assert_eq!(grid, grid2);
}

#[test]
fn ne_partial_eq() {
let grid = grid![[f64::NAN]];
assert_ne!(grid, grid);
}

#[test]
#[should_panic]
#[allow(clippy::should_panic_without_expect)]
Expand Down

0 comments on commit 62782c0

Please sign in to comment.