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

Function test_mutable_shrink_to_fit

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

Source from the content-addressed store, hash-verified

1380
1381 #[test]
1382 fn test_mutable_shrink_to_fit() {
1383 let mut buffer = MutableBuffer::new(128);
1384 assert_eq!(buffer.capacity(), 128);
1385 buffer.push(1);
1386 buffer.push(2);
1387
1388 buffer.shrink_to_fit();
1389 assert!(buffer.capacity() >= 64 && buffer.capacity() < 128);
1390 }
1391
1392 #[test]
1393 fn test_mutable_set_null_bits() {

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
shrink_to_fitMethod · 0.45

Tested by

no test coverage detected