Skip to content

Commit

Permalink
Include empty BTreeMap in clone_from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crgl committed Jan 28, 2020
1 parent 3caa17b commit 60a7c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liballoc/tests/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,17 +560,17 @@ fn test_clone_from() {
let size = 30;

for i in 0..size {
map1.insert(i, 10 * i);
let mut map2 = BTreeMap::new();
for j in 0..i {
map2.insert(100 * j + 1, 2 * j + 1);
let mut map1_copy = map2.clone();
map1_copy.clone_from(&map1);
assert_eq!(map1_copy, map1);
let mut map2_copy = map1.clone();
map2_copy.clone_from(&map2);
assert_eq!(map2_copy, map2);
map2.insert(100 * j + 1, 2 * j + 1);
}
map1.insert(i, 10 * i);
}
}

Expand Down

0 comments on commit 60a7c94

Please sign in to comment.