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

Function test_mutable_set_null_bits

arrow-buffer/src/buffer/mutable.rs:1393–1403  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1391
1392 #[test]
1393 fn test_mutable_set_null_bits() {
1394 let mut buffer = MutableBuffer::new(8).with_bitset(8, true);
1395
1396 for i in 0..=buffer.capacity() {
1397 buffer.set_null_bits(i, 0);
1398 assert_eq!(buffer[..8], [255; 8][..]);
1399 }
1400
1401 buffer.set_null_bits(1, 4);
1402 assert_eq!(buffer[..8], [255, 0, 0, 0, 0, 255, 255, 255][..]);
1403 }
1404
1405 #[test]
1406 #[should_panic = "out of bounds for buffer of length"]

Callers

nothing calls this directly

Calls 3

with_bitsetMethod · 0.80
set_null_bitsMethod · 0.80
capacityMethod · 0.45

Tested by

no test coverage detected