Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kinto-b committed Apr 15, 2024
1 parent 347d52a commit a373e69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,12 @@ fn zip_eq_panic2() {

zip_eq(&a, &b).count();
}

#[should_panic]
#[test]
fn zip_eq_panic3() {
let a = [1, 2];
let b = [1, 2, 3];

zip_eq(&a, &b).fold(0, |acc, (x, y)| acc + x * y);
}

0 comments on commit a373e69

Please sign in to comment.