mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 04:00:01 +00:00
Improve panic message for invalid Range index in Frame::new test
This commit is contained in:
parent
092a7b7cce
commit
453e34ef82
@ -1124,10 +1124,10 @@ mod tests {
|
|||||||
Frame::new(matrix, vec!["X", "Y"], Some(index));
|
Frame::new(matrix, vec!["X", "Y"], Some(index));
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "Cannot explicitly provide a Range index")]
|
#[should_panic(expected = "Frame::new: Range index length (4) mismatch matrix rows (3)")]
|
||||||
fn frame_new_panic_explicit_range() {
|
fn frame_new_panic_invalid_explicit_range_index() {
|
||||||
let matrix = create_test_matrix_f64();
|
let matrix = create_test_matrix_f64(); // 3 rows
|
||||||
let index = RowIndex::Range(0..3); // User cannot provide Range directly
|
let index = RowIndex::Range(0..4); // Range 0..4 but only 3 rows
|
||||||
Frame::new(matrix, vec!["A", "B"], Some(index));
|
Frame::new(matrix, vec!["A", "B"], Some(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user