Skip to content

Commit

Permalink
Reproducible test for issue bodil#124 - hopefully.
Browse files Browse the repository at this point in the history
  • Loading branch information
bodil committed Jul 14, 2020
1 parent 96f7ed8 commit 1728d2b
Show file tree
Hide file tree
Showing 2 changed files with 3,505 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ord/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,19 @@ mod test {
assert_eq!(vec![(3, 4), (2, 3), (1, 2)], range);
}

#[test]
fn issue_124() {
let mut map = OrdMap::new();
let contents = include_str!("../../test-fixtures/issue_124.txt");
for line in contents.split('\n') {
if line.starts_with("insert ") {
map.insert(line[7..].parse::<u32>().unwrap(), 0);
} else if line.starts_with("remove ") {
map.remove(&line[7..].parse::<u32>().unwrap());
}
}
}

proptest! {
#[test]
fn length(ref input in collection::btree_map(i16::ANY, i16::ANY, 0..1000)) {
Expand Down
Loading

0 comments on commit 1728d2b

Please sign in to comment.