Skip to content

Commit 6d1a35a

Browse files
Philippe-Choletjswrenn
authored andcommitted
Tuples::size_hint tests
1 parent 3fe220b commit 6d1a35a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/quick.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,18 @@ quickcheck! {
11841184
assert_eq!(buffer.len(), a.len() % 4);
11851185
exact_size(buffer)
11861186
}
1187+
1188+
fn tuples_size_hint_inexact(a: Iter<u8>) -> bool {
1189+
correct_size_hint(a.clone().tuples::<(_,)>())
1190+
&& correct_size_hint(a.clone().tuples::<(_, _)>())
1191+
&& correct_size_hint(a.tuples::<(_, _, _, _)>())
1192+
}
1193+
1194+
fn tuples_size_hint_exact(a: Iter<u8, Exact>) -> bool {
1195+
exact_size(a.clone().tuples::<(_,)>())
1196+
&& exact_size(a.clone().tuples::<(_, _)>())
1197+
&& exact_size(a.tuples::<(_, _, _, _)>())
1198+
}
11871199
}
11881200

11891201
// with_position

0 commit comments

Comments
 (0)