Skip to content

Commit 42c5248

Browse files
YuhanLiinreitermarkus
authored andcommitted
Add equality test
1 parent a18a0d5 commit 42c5248

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/indexmap.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,4 +1879,11 @@ mod tests {
18791879
assert_eq!(value, i + 1);
18801880
}
18811881
}
1882+
1883+
#[test]
1884+
fn partial_eq_floats() {
1885+
// Make sure PartialEq is implemented even if V doesn't implement Eq
1886+
let map: IndexMap<usize, f32> = Default::default();
1887+
assert_eq!(map, map);
1888+
}
18821889
}

0 commit comments

Comments
 (0)