Skip to content

Commit

Permalink
Tuples::size_hint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Sep 27, 2023
1 parent 3667735 commit 84e774f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,18 @@ quickcheck! {
assert_eq!(buffer.len(), a.len() % 4);
exact_size(buffer)
}

fn tuples_size_hint_inexact(a: Iter<u8>) -> bool {
correct_size_hint(a.clone().tuples::<(_,)>())
&& correct_size_hint(a.clone().tuples::<(_, _)>())
&& correct_size_hint(a.tuples::<(_, _, _, _)>())
}

fn tuples_size_hint_exact(a: Iter<u8, Exact>) -> bool {
exact_size(a.clone().tuples::<(_,)>())
&& exact_size(a.clone().tuples::<(_, _)>())
&& exact_size(a.tuples::<(_, _, _, _)>())
}
}

// with_position
Expand Down

0 comments on commit 84e774f

Please sign in to comment.