Add panic test for frame_zip method with incompatible dimensions

This commit is contained in:
Palash Tyagi 2025-07-06 10:47:21 +01:00
parent 073a22b866
commit 601dc66d7d

View File

@ -1721,6 +1721,16 @@ mod tests {
assert!((zipped_frame["B"][2] - 6.6).abs() < FLOAT_TOLERANCE);
}
#[test]
#[should_panic(expected = "Frame::frame_zip: incompatible dimensions (self: 3x1, other: 3x2)")]
fn test_frame_zip_panic() {
let mut f1 = create_test_frame_f64();
let f2 = create_test_frame_f64_alt();
f1.delete_column("B");
f1.frame_zip(&f2, |x, y| x + y); // Should panic due to different column counts
}
// --- Element-wise Arithmetic Ops Tests ---
#[test]
fn test_frame_arithmetic_ops_f64() {