MCPcopy Create free account
hub / github.com/apache/arrow-rs / create_expected_repeated_slice

Function create_expected_repeated_slice

arrow-buffer/src/buffer/mutable.rs:1537–1547  ·  view source on GitHub ↗
(
        slice_to_repeat: &[T],
        repeat_count: usize,
    )

Source from the content-addressed store, hash-verified

1535 }
1536
1537 fn create_expected_repeated_slice<T: ArrowNativeType>(
1538 slice_to_repeat: &[T],
1539 repeat_count: usize,
1540 ) -> Buffer {
1541 let mut expected = MutableBuffer::new(size_of_val(slice_to_repeat) * repeat_count);
1542 for _ in 0..repeat_count {
1543 // Not using push_slice_repeated as this is the function under test
1544 expected.extend_from_slice(slice_to_repeat);
1545 }
1546 expected.into()
1547 }
1548
1549 // Helper to test a specific repeat count with various slice sizes
1550 fn test_repeat_count<T: ArrowNativeType + PartialEq + std::fmt::Debug>(

Callers 1

test_repeat_countFunction · 0.85

Calls 1

extend_from_sliceMethod · 0.80

Tested by

no test coverage detected