Skip to content

Commit

Permalink
Add equality test
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhanLiin committed Jul 20, 2024
1 parent d174350 commit 4b71635
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/indexmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,4 +1831,11 @@ mod tests {
assert_eq!(value, i + 1);
}
}

#[test]
fn partial_eq_floats() {
// Make sure PartialEq is implemented even if V doesn't implement Eq
let map: IndexMap<usize, f32> = Default::default();
assert_eq!(map, map);
}
}

0 comments on commit 4b71635

Please sign in to comment.