Skip to content

Commit a373e69

Browse files
committed
Add test
1 parent 347d52a commit a373e69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/zip.rs

+9
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ fn zip_eq_panic2() {
7373

7474
zip_eq(&a, &b).count();
7575
}
76+
77+
#[should_panic]
78+
#[test]
79+
fn zip_eq_panic3() {
80+
let a = [1, 2];
81+
let b = [1, 2, 3];
82+
83+
zip_eq(&a, &b).fold(0, |acc, (x, y)| acc + x * y);
84+
}

0 commit comments

Comments
 (0)