Skip to content

Commit

Permalink
Improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Jan 19, 2024
1 parent 7e964fc commit 44e3e3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ipa-core/src/seq_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,21 @@ mod test {
});
}

#[test]
fn size() {
run(|| async {
let mut count = 10_usize;
let capacity = NonZeroUsize::new(3).unwrap();
let mut values = seq_join(capacity, iter((0..count).map(|i| async move { i })));
assert_eq!((count, Some(count)), values.size_hint());

while values.next().await.is_some() {
count -= 1;
assert_eq!((count, Some(count)), values.size_hint());
}
});
}

#[test]
fn out_of_order() {
run(|| async {
Expand Down

0 comments on commit 44e3e3e

Please sign in to comment.