Helper to test a specific repeat count with various slice sizes
(
repeat_count: usize,
test_data: &[T],
)
| 1548 | |
| 1549 | // Helper to test a specific repeat count with various slice sizes |
| 1550 | fn test_repeat_count<T: ArrowNativeType + PartialEq + std::fmt::Debug>( |
| 1551 | repeat_count: usize, |
| 1552 | test_data: &[T], |
| 1553 | ) { |
| 1554 | let mut buffer = MutableBuffer::new(0); |
| 1555 | buffer.repeat_slice_n_times(test_data, repeat_count); |
| 1556 | |
| 1557 | let expected = create_expected_repeated_slice(test_data, repeat_count); |
| 1558 | let result: Buffer = buffer.into(); |
| 1559 | |
| 1560 | assert_eq!( |
| 1561 | result, |
| 1562 | expected, |
| 1563 | "Failed for repeat_count={}, slice_len={}", |
| 1564 | repeat_count, |
| 1565 | test_data.len() |
| 1566 | ); |
| 1567 | } |
| 1568 | |
| 1569 | #[test] |
| 1570 | fn test_repeat_slice_count_edge_cases() { |
no test coverage detected