Skip to content

Commit

Permalink
Test MultiProduct specializations
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Nov 13, 2023
1 parent 67b6c89 commit 62e11b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/specializations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ quickcheck! {
TestResult::passed()
}

#[ignore] // It currently fails because `MultiProduct` is not fused.
fn multi_cartesian_product(a: Vec<u8>, b: Vec<u8>, c: Vec<u8>) -> TestResult {
if a.len() * b.len() * c.len() > 100 {
return TestResult::discard();
}
test_specializations(&vec![a, b, c].into_iter().multi_cartesian_product());
TestResult::passed()
}

fn coalesce(v: Vec<u8>) -> () {
test_specializations(&v.iter().coalesce(|x, y| if x == y { Ok(x) } else { Err((x, y)) }))
}
Expand Down

0 comments on commit 62e11b0

Please sign in to comment.