Skip to content

Commit

Permalink
#88 extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 27, 2023
1 parent a1757db commit 4492980
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ fn overwrites_keys() {
assert_eq!(1, m.len());
}

#[test]
#[should_panic]
fn cant_write_into_empty_map() {
let mut m: Map<i32, i32, 0> = Map::new();
m.insert(1, 42);
}

#[test]
fn empty_length() {
let m: Map<u32, u32, 10> = Map::new();
Expand Down

0 comments on commit 4492980

Please sign in to comment.