Skip to content

Commit

Permalink
TupleWindows: exact size test
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet authored and jswrenn committed Sep 19, 2023
1 parent 43cfe24 commit 882581f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,14 @@ quickcheck! {
itertools::equal(x, y)
}

fn tuple_windows_exact_size_1(a: Vec<u8>) -> bool {
exact_size(a.iter().tuple_windows::<(_,)>())
}

fn tuple_windows_exact_size_4(a: Vec<u8>) -> bool {
exact_size(a.iter().tuple_windows::<(_, _, _, _)>())
}

fn equal_tuples_1(a: Vec<u8>) -> bool {
let x = a.chunks(1).map(|s| (&s[0], ));
let y = a.iter().tuples::<(_,)>();
Expand Down

0 comments on commit 882581f

Please sign in to comment.